<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'help reading text into hashmap!' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'help reading text into hashmap!' posted on the 'Java' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 19:24:16 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 19:24:16 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>help reading text into hashmap!</title>
      <link>http://www.programmersheaven.com/mb/java/427635/427635/help-reading-text-into-hashmap/</link>
      <description>Hey everyone. I'm at the point where in this program I need to read a textfile and place the entries into a hashmap.&lt;br /&gt;
this is the txt example&lt;br /&gt;
1&amp;lt;&amp;gt;John Kane&lt;br /&gt;
2&amp;lt;&amp;gt;Jane Lyman&lt;br /&gt;
3&amp;lt;&amp;gt;Peter Hansen&lt;br /&gt;
4&amp;lt;&amp;gt;Cathy Harris&lt;br /&gt;
&lt;br /&gt;
I've designed the main app which is the GUI. I have several text areas where I need to display the name only. &lt;br /&gt;
&lt;br /&gt;
On a separate class I need to have it handle the I/O, with buffered reader and read each text files line by line and place them into a hashmap skipping the "&amp;lt;&amp;gt;." Then some how have it displayed in the text areas... can anyone help me out on this?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java/427635/427635/help-reading-text-into-hashmap/</guid>
      <pubDate>Sun, 26 Feb 2012 17:54:41 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Re: help reading text into hashmap!</title>
      <link>http://www.programmersheaven.com/mb/java/427635/428033/re-help-reading-text-into-hashmap/#428033</link>
      <description>Just one of possible ways:&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.FileReader;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class Test {&lt;br /&gt;
	public static void main(String[] args) throws Exception {&lt;br /&gt;
		BufferedReader reader = new BufferedReader( new FileReader( "E:/test.txt" ));&lt;br /&gt;
		String line = null;&lt;br /&gt;
		Map&amp;lt;String, String&amp;gt; result = new HashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;
		while( (line = reader.readLine()) != null ){&lt;br /&gt;
			String[] arr = line.split( "&amp;lt;&amp;gt;" );&lt;br /&gt;
			result.put( arr[0], arr[1] );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java/427635/428033/re-help-reading-text-into-hashmap/#428033</guid>
      <pubDate>Wed, 28 Mar 2012 04:20:19 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Re: help reading text into hashmap!</title>
      <link>http://www.programmersheaven.com/mb/java/427635/428034/re-help-reading-text-into-hashmap/#428034</link>
      <description>Just one of possible ways:&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.FileReader;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class Test {&lt;br /&gt;
	public static void main(String[] args) throws Exception {&lt;br /&gt;
		BufferedReader reader = new BufferedReader( new FileReader( "E:/test.txt" ));&lt;br /&gt;
		String line = null;&lt;br /&gt;
		Map&amp;lt;String, String&amp;gt; result = new HashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;
		while( (line = reader.readLine()) != null ){&lt;br /&gt;
			String[] arr = line.split( "&amp;lt;&amp;gt;" );&lt;br /&gt;
			result.put( arr[0], arr[1] );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java/427635/428034/re-help-reading-text-into-hashmap/#428034</guid>
      <pubDate>Wed, 28 Mar 2012 04:22:10 -0700</pubDate>
      <category>Java</category>
    </item>
  </channel>
</rss>