<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sim0rns Website / blog</title>
	<atom:link href="http://www.simorn.de/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simorn.de</link>
	<description>Die Internetpräsenz von Sim0rn</description>
	<lastBuildDate>Wed, 07 Jul 2010 12:08:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>11 Must Have Android Apps</title>
		<link>http://www.simorn.de/archives/139?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=11-must-have-android-apps</link>
		<comments>http://www.simorn.de/archives/139#comments</comments>
		<pubDate>Wed, 07 Jul 2010 08:48:50 +0000</pubDate>
		<dc:creator>Sim0rn</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android app]]></category>
		<category><![CDATA[motorola droid]]></category>
		<category><![CDATA[motorola milestone]]></category>

		<guid isPermaLink="false">http://www.simorn.de/?p=139</guid>
		<description><![CDATA[You should know, I’m a huge Android fan boy and because of this, here is my top 11 Android Apps for the Motorola Droid running Android 2.1. K-9 Mail This App is far better than the original Email Client on the Android. It gives you an nice looking overview of your mails. K-9 also provides [...]]]></description>
			<content:encoded><![CDATA[<p>You should know, I’m a huge Android fan boy and because of this, here is my top 11 Android Apps for the Motorola Droid running Android 2.1.<br />
<span id="more-139"></span></p>
<ol>
<li><strong> K-9 Mail </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/k-9.png" rel="shadowbox[post-139];player=img;" title="k-9"><img src="http://www.simorn.de/wp-content/uploads/2010/07/k-9-168x300.png" alt="" title="k-9" width="168" height="300" class="alignleft size-medium wp-image-150" /></a><br />
This App is far better than the original Email Client on the Android. It gives you an nice looking overview of your mails. K-9 also provides you with more settings than the native email app. The best feature i guess is the error log. You can finally see, what went wrong : D</p>
<p><br/><br/><br/><br/><br/><br/>
</li>
<li><strong> Dropbox </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/dropbox.png" rel="shadowbox[post-139];player=img;" title="dropbox"><img src="http://www.simorn.de/wp-content/uploads/2010/07/dropbox-168x300.png" alt="" title="dropbox" width="168" height="300" class="alignright size-medium wp-image-146" /></a><br />
If you haven’t heard of &#8220;Dropbox&#8221; you should take a look at <a href="https://www.dropbox.com">dropbox.com/</a>. This tool synchronizes your set Shared Folder on your PC to an virtual Folder on the Internet. With this app, you can kepp track of your Shared Folder on the Android. You’re able to Down-, Upload and Delete Files from your mobile to your shared Folder. This App is just awesome when you’re working on different Devices.
</p>
<p><br/></li>
<li><strong> Android Agenda Widget</strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/android_agenda_widget.png" rel="shadowbox[post-139];player=img;" title="android_agenda_widget"><img src="http://www.simorn.de/wp-content/uploads/2010/07/android_agenda_widget-168x300.png" alt="" title="android_agenda_widget" width="168" height="300" class="alignleft size-medium wp-image-143" /></a><br />
This App provides you with a Calendar Widget for your Homescreen. The format goes from 2&#215;2 (that means, it takes 2 app icons width and 2 app icons height) to 4&#215;4. The upcoming events from your Google Calendar are listed chronological. Great for keeping the overview of your Calendar.<br />
It’s also capable of displaying shared Google Calendars.
</p>
<p><br/><br/><br/><br/></li>
<li><strong> Last.fm </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/last_fm.png" rel="shadowbox[post-139];player=img;" title="last_fm"><img src="http://www.simorn.de/wp-content/uploads/2010/07/last_fm-168x300.png" alt="" title="last_fm" width="168" height="300" class="alignright size-medium wp-image-151" /></a><br />
Last.fm is just an awesome app if you are listening to Music using your Android. It’s not just able to connect to Streams, it also gives you some further Information about the Music you have on your Smartphone. One of the great features is for example the &#8220;Music Alike&#8221;. You can get a list of Music that’s like the one are listening.<br />
<a href="http://www.simorn.de/wp-content/uploads/2010/07/last_fm_2.png" rel="shadowbox[post-139];player=img;" title="last_fm_2"><img src="http://www.simorn.de/wp-content/uploads/2010/07/last_fm_2-150x150.png" alt="" title="last_fm_2" width="150" height="150" class="alignleft size-thumbnail wp-image-152" /></a></p>
<p><br/><br/><br/><br/><br/></li>
<li><strong> Howcast </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/howcast.png" rel="shadowbox[post-139];player=img;" title="howcast"><img src="http://www.simorn.de/wp-content/uploads/2010/07/howcast-168x300.png" alt="" title="howcast" width="168" height="300" class="alignleft size-medium wp-image-149" /></a><br />
This is one of the more interesting Apps. It’s a Video library of How-To Videos from Howcast.com. You can watch em like you watch videos on youtube. And it’s totally free. Must have!
</p>
<p><br/><br/><br/><br/><br/><br/></</li>
<li><strong> AndFTP </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/andftp.png" rel="shadowbox[post-139];player=img;" title="andftp"><img src="http://www.simorn.de/wp-content/uploads/2010/07/andftp-168x300.png" alt="" title="andftp" width="168" height="300" class="alignright size-medium wp-image-142" /></a><br />
Great ftp App. You can manage unlimited ftp accounts. It has also a nice solution for the up- and downloading. You’re also able to manage file permissions.
</p>
<p><br/><br/><br/><br/><br/><br/></</li>
<li><strong> GDocs </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/gdocs.png" rel="shadowbox[post-139];player=img;" title="gdocs"><img src="http://www.simorn.de/wp-content/uploads/2010/07/gdocs-e1278488696360-150x150.png" alt="" title="gdocs" width="150" height="150" class="alignleft size-thumbnail wp-image-148" /></a><br />
If your an user of GoogleDocs, this is a must have App. You can do whatever you can do with a normal Web View on the GoogleDocs. By the way, it’s just awesome to see a spreadsheet on your mobile <img src='http://www.simorn.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
</p>
<p><br/></li>
<li><strong> WordPress </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/wordpress.png" rel="shadowbox[post-139];player=img;" title="wordpress"><img src="http://www.simorn.de/wp-content/uploads/2010/07/wordpress-168x300.png" alt="" title="wordpress" width="168" height="300" class="alignright size-medium wp-image-155" /></a><br />
You’re sitting on the train and your notebooks battery run out from watching scrubs? This is the app to post your articles on the go. But I admit, it could need some more features. If you’re not aware of HTML it gives you just limited options. However the media inserting is just great. You can make a video and insert it to your blog with just a few clicks.
</p>
<p><br/><br/><br/><br/></li>
<li><strong> Quick Settings </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/quick_settings.png" rel="shadowbox[post-139];player=img;" title="quick_settings"><img src="http://www.simorn.de/wp-content/uploads/2010/07/quick_settings-168x300.png" alt="" title="quick_settings" width="168" height="300" class="alignleft size-medium wp-image-154" /></a><br />
Nice little app to set some important Attributes. The Volume Control gives you perfect control of your Volume settings. You won’t find anything similar on the original settings.</p>
<p><br/><br/><br/><br/><br/><br/></</li>
<li><strong> Password Safe </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/password-safe.png" rel="shadowbox[post-139];player=img;" title="password safe"><img src="http://www.simorn.de/wp-content/uploads/2010/07/password-safe-e1278488640204-300x168.png" alt="" title="password safe" width="300" height="168" class="alignright size-medium wp-image-153" /></a><br />
This is one of my essential apps. I have so many passwords and due to increasing importance of a good security policy, I need to change a few monthly. It’s just impossible to remember all of em.
</p>
<p><br/></li>
<li><strong> HOMERUN Battle 3d </strong>
<p>
<a href="http://www.simorn.de/wp-content/uploads/2010/07/baseball_1.png" rel="shadowbox[post-139];player=img;" title="baseball_1"><img src="http://www.simorn.de/wp-content/uploads/2010/07/baseball_1-e1278488118960-300x168.png" alt="" title="baseball_1" width="300" height="168" class="alignleft size-medium wp-image-144" /></a><br />
<a href="http://www.simorn.de/wp-content/uploads/2010/07/baseball_2.png" rel="shadowbox[post-139];player=img;" title="baseball_2"><img src="http://www.simorn.de/wp-content/uploads/2010/07/baseball_2-e1278488148905-150x150.png" alt="" title="baseball_2" width="150" height="150" class="alignright size-thumbnail wp-image-145" /></a></p>
<p><br/><br/><br/><br/><br />
Now for a little fun Time. This is <strong>probably the best toilet game EVER!</strong>. You can just hit a few balls in the arcade mode or you face some real opponents in the online multiplayer mode. Really fun game!</p>
<p><br/></li>
</ol>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.simorn.de/archives/139/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.simorn.de/archives/139&amp;t=11+Must+Have+Android+Apps" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.simorn.de/archives/139&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.simorn.de/archives/139&amp;t=11+Must+Have+Android+Apps" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=11+Must+Have+Android+Apps+-+File: /data/app/webapp/functions.php<br />Line: 7<br />Message: Too many connections&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.simorn.de/archives/139&amp;n=11+Must+Have+Android+Apps&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%2211%20Must%20Have%20Android%20Apps%22&amp;body=Link: http://www.simorn.de/archives/139 (sent via shareaholic)%0D%0A%0D%0A----%0D%0A You%20should%20know%2C%20I%E2%80%99m%20a%20huge%20Android%20fan%20boy%20and%20because%20of%20this%2C%20here%20is%20my%20top%2011%20Android%20Apps%20for%20the%20Motorola%20Droid%20running%20Android%202.1.%0D%0A%0D%0A%0D%0A%20K-9%20Mail%20%0D%0A%0D%0A%0D%0AThis%20App%20is%20far%20better%20than%20the%20original%20Email%20Client%20on%20the%20Android.%20It%20gives%20you%20an%20nice%20looking%20overview%20of%20your%20mails.%20K-9%20also%20provi" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.simorn.de/archives/139&amp;title=11+Must+Have+Android+Apps" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-n4g">
			<a href="http://www.n4g.com/tips.aspx?url=http://www.simorn.de/archives/139&amp;title=11+Must+Have+Android+Apps" rel="nofollow" class="external" title="Submit tip to N4G">Submit tip to N4G</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.simorn.de/archives/139/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using the Java VisualVM to optimize your Java Applications</title>
		<link>http://www.simorn.de/archives/67?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-the-java-visualvm-to-optimize-your-java-applications</link>
		<comments>http://www.simorn.de/archives/67#comments</comments>
		<pubDate>Thu, 01 Jul 2010 13:05:07 +0000</pubDate>
		<dc:creator>Sim0rn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Java VM]]></category>

		<guid isPermaLink="false">http://www.simorn.de/?p=67</guid>
		<description><![CDATA[If you never heard of the “Java VisualVM” you might want to take a look at this article. This tool provides detailed Information about your running Java Applications. Here&#8217;s a short impression of the tool. First you probably think, “where do I get this Tool from?” The surprise is that you already have it (in [...]]]></description>
			<content:encoded><![CDATA[<p>If you never heard of the “Java VisualVM” you might want to take a look at this article. This tool provides detailed Information about your running Java Applications. Here&#8217;s a short impression of the tool.</p>
<p><span id="more-67"></span></p>
<p><a href="http://www.simorn.de/wp-content/uploads/2010/07/banner1.png" rel="shadowbox[post-67];player=img;" title="banner"><img src="http://www.simorn.de/wp-content/uploads/2010/07/banner1.png" alt="" title="banner" width="530" height="311" class="aligncenter size-full wp-image-60" /></a></p>
<p>First you probably think, “where do I get this Tool from?” The surprise is that you already have it (in case you installed a Java SDK). You can find the tool (“jvisualvm.exe”) in you java jdk\bin Directory. (e.g. “C:\Program Files\Java\jdk1.6.0_18\bin\jvisualvm.exe”).</p>
<p><strong>So what does the Java VisualVM?</strong></p>
<blockquote><p> Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java applications while they are running on a Java Virtual Machine (JVM), and for troubleshooting and profiling these applications.</p></blockquote>
<p>Let’s step right into it and have a look at the GUI. </p>
<p><a href="http://www.simorn.de/wp-content/uploads/2010/07/startup_javaVVM.png" rel="shadowbox[post-67];player=img;" title="startup_javaVVM"><img src="http://www.simorn.de/wp-content/uploads/2010/07/startup_javaVVM-300x174.png" alt="" title="startup_javaVVM" width="300" height="174" class="aligncenter size-medium wp-image-64" /></a></p>
<p>On the first look, you probably won&#8217;t find anything interesting. But the time, you start your Java Application, new Java Classes are listed below the “VisualVM”.</p>
<p><a href="http://www.simorn.de/wp-content/uploads/2010/07/class-overview.png" rel="shadowbox[post-67];player=img;" title="class overview"><img src="http://www.simorn.de/wp-content/uploads/2010/07/class-overview.png" alt="" title="class overview" width="356" height="255" class="aligncenter size-full wp-image-77" /></a></p>
<p>You can double-click the Class and you’ll see some detailed Information. The tabs above are the point, where it gets interesting.</p>
<p><a href="http://www.simorn.de/wp-content/uploads/2010/07/tabs.png" rel="shadowbox[post-67];player=img;" title="tabs"><img src="http://www.simorn.de/wp-content/uploads/2010/07/tabs-300x120.png" alt="" title="tabs" width="300" height="120" class="aligncenter size-medium wp-image-80" /></a></p>
<p><strong>Monitor</strong><br />
The Page “Monitor” gives you some detailed Information about your JavaVM. You can see the current CPU Usage, current Heap Size of the VM and so on. </p>
<p><a href="http://www.simorn.de/wp-content/uploads/2010/07/monitor.png" rel="shadowbox[post-67];player=img;" title="monitor"><img src="http://www.simorn.de/wp-content/uploads/2010/07/monitor-300x229.png" alt="" title="monitor" width="300" height="229" class="aligncenter size-medium wp-image-114" /></a></p>
<p><strong>Profiler</strong><br />
The next fascinating Menu is the “Profiler”. Here you can start, e.g. the Memory profiling. From now on, the Java VisualVM logs any Object that is created and still alive. Because of the profiling function, this tool got my attention.</p>
<p><a href="http://www.simorn.de/wp-content/uploads/2010/07/profiler_memory.png" rel="shadowbox[post-67];player=img;" title="profiler_memory"><img src="http://www.simorn.de/wp-content/uploads/2010/07/profiler_memory-300x184.png" alt="" title="profiler_memory" width="300" height="184" class="aligncenter size-medium wp-image-62" /></a></p>
<p>I used this tool to find the reason for an Application getting slower and slower. So I started profiling the Application and after a few minutes I knew that it was an unnecessary Object Creation task that created more and more Objects. I knew that beforehand but i just couldn&#8217;t (or was to lazy for) locate the mistake.</p>
<p><strong>Conclusion</strong><br />
After all, this tool isn’t the Solution for all your Problems, but it might help you, giving a more detailed impression of your application. Maybe you find some room for improvement by looking at the behaviour of your Application.</p>
<p>Feel free to leave a comment.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.simorn.de/archives/67/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.simorn.de/archives/67&amp;t=Using+the+Java+VisualVM+to+optimize+your+Java+Applications" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.simorn.de/archives/67&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.simorn.de/archives/67&amp;t=Using+the+Java+VisualVM+to+optimize+your+Java+Applications" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Using+the+Java+VisualVM+to+optimize+your+Java+Applications+-+http://b2l.me/79428&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.simorn.de/archives/67&amp;n=Using+the+Java+VisualVM+to+optimize+your+Java+Applications&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Using%20the%20Java%20VisualVM%20to%20optimize%20your%20Java%20Applications%22&amp;body=Link: http://www.simorn.de/archives/67 (sent via shareaholic)%0D%0A%0D%0A----%0D%0A If%20you%20never%20heard%20of%20the%20%E2%80%9CJava%20VisualVM%E2%80%9D%20you%20might%20want%20to%20take%20a%20look%20at%20this%20article.%20This%20tool%20provides%20detailed%20Information%20about%20your%20running%20Java%20Applications.%20Here%27s%20a%20short%20impression%20of%20the%20tool.%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AFirst%20you%20probably%20think%2C%20%E2%80%9Cwhere%20do%20I%20get%20this%20Tool%20from%3F%E2%80%9D%20The%20surprise%20is%20" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.simorn.de/archives/67&amp;title=Using+the+Java+VisualVM+to+optimize+your+Java+Applications" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-n4g">
			<a href="http://www.n4g.com/tips.aspx?url=http://www.simorn.de/archives/67&amp;title=Using+the+Java+VisualVM+to+optimize+your+Java+Applications" rel="nofollow" class="external" title="Submit tip to N4G">Submit tip to N4G</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.simorn.de/archives/67/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mapping read attributes to an existing model via Java Reflection API</title>
		<link>http://www.simorn.de/archives/48?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mapping-read-attributes-to-an-existing-model-via-java-reflection-api</link>
		<comments>http://www.simorn.de/archives/48#comments</comments>
		<pubDate>Wed, 30 Jun 2010 10:59:42 +0000</pubDate>
		<dc:creator>Sim0rn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Reflection API]]></category>

		<guid isPermaLink="false">http://www.simorn.de/?p=48</guid>
		<description><![CDATA[Here´s a way, how to map read Key / Value Pairs to a Model with the Java Reflection API. First of all, let´s say you have a reader (e.g. a BufferedReader) which reads Key/Value Pairs. So you´ll get from one Line of the Reader something like this: name=fred surname=fart Now you have a modell, which [...]]]></description>
			<content:encoded><![CDATA[<p>Here´s a way, how to map read Key / Value Pairs to a Model with the Java Reflection API.<br />
<span id="more-48"></span></p>
<p>First of all, let´s say you have a reader (e.g. a BufferedReader) which reads Key/Value Pairs. So you´ll get from one Line of the Reader something like this:</p>
<pre class="brush: java;">
  name=fred
  surname=fart
</pre>
<p>Now you have a modell, which provides all the keys as attributes.</p>
<pre class="brush: java;">
public class Person {
  private String name;
  private String surname;

...

setName(String newName) {
  this.name = newName;
}
setSurname(String newName) {
  this.name = newName;
}

...
}
</pre>
<p>now we´ll get to the reading routine</p>
<pre class="brush: java;">
public class xxx {
  ...
  import java.lang.reflect.InvocationTargetException;
  import java.lang.reflect.Method;
  ...

//this method reads the information e.g. with the help of an bufferedReader
  public Person readPersonInformation(PersonInformationObject pio) {

    ...
    Person newPerson = new Person();

    while ((line = reader.readLine()) != null) {
      parseReadPersonAttributes(newPerson, line);
    }
    ...
    return newPerson;
  }

/**this method parses the read information
* @newPerson the object, where the new value is beeing invoked on
* @codedInformation the read key-value line
**/
  private void parseReadPersonAttributes(Person newPerson, String codedInformation) {
    String information = codedInformation;
    //if there is noch equal symbol, than isnt able to be interpreted
    if (information.contains(&quot;=&quot;)) {
      String interpretedInformation[] = new String[2];
      interpretedInformation = information.split(&quot;=&quot;);
      if (interpretedInformation.length &amp;gt; 1) {
        //now for the Reflaction API
        Method personMethods[] = Person.class.getMethods();
        for (Method method : personMethods) {
          //find the setter Method for the Attribute
          if (method.getName().equalsIgnoreCase(&quot;set&quot; + interpretedInformation[0])) {
            try {
              //now that a Method is found, try to invoke the method with the read Information
              method.invoke(newPerson, interpretedInformation[1]);
            } catch (Exception ex) {
              //errorhandling
            }
          }
        }
      }
    }
  }
}
</pre>
<p>The code searchs for a fitting setter Method in the Person Modell. If he finds a appropriate Method, its invoking this method on the given Person Object, in order to set the read Information</p>
<p>Note that if there are more keys read than there are attributes in the modell, you just have to add those attributes to the modell. I think that this is a good way, to map read information to a modell</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.simorn.de/archives/48/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.simorn.de/archives/48&amp;t=Mapping+read+attributes+to+an+existing+model+via+Java+Reflection+API" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.simorn.de/archives/48&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.simorn.de/archives/48&amp;t=Mapping+read+attributes+to+an+existing+model+via+Java+Reflection+API" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Mapping+read+attributes+to+an+existing+model+via+Java+Reflection+API+-+http://b2l.me/795e2&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.simorn.de/archives/48&amp;n=Mapping+read+attributes+to+an+existing+model+via+Java+Reflection+API&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Mapping%20read%20attributes%20to%20an%20existing%20model%20via%20Java%20Reflection%20API%22&amp;body=Link: http://www.simorn.de/archives/48 (sent via shareaholic)%0D%0A%0D%0A----%0D%0A Here%C2%B4s%20a%20way%2C%20how%20to%20map%20read%20Key%20%2F%20Value%20Pairs%20to%20a%20Model%20with%20the%20Java%20Reflection%20API.%0D%0A%0D%0A%0D%0AFirst%20of%20all%2C%20let%C2%B4s%20say%20you%20have%20a%20reader%20%28e.g.%20a%20BufferedReader%29%20which%20reads%20Key%2FValue%20Pairs.%20So%20you%C2%B4ll%20get%20from%20one%20Line%20of%20the%20Reader%20something%20like%20this%3A%0D%0A%5Bjava%5D%0D%0A%20%20name%3Dfred%0D%0A%20%20surname%3Dfart%0D%0A%5B%2Fjava%5D" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.simorn.de/archives/48&amp;title=Mapping+read+attributes+to+an+existing+model+via+Java+Reflection+API" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-n4g">
			<a href="http://www.n4g.com/tips.aspx?url=http://www.simorn.de/archives/48&amp;title=Mapping+read+attributes+to+an+existing+model+via+Java+Reflection+API" rel="nofollow" class="external" title="Submit tip to N4G">Submit tip to N4G</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.simorn.de/archives/48/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

