M
Maz
I've created an application that needs to read in the contents of a
text file and to insert the data into a new hashtable. (The file was
created by writing the contents of a hashtable out to a text file.)
When I was using J2SE, I had a simple method involving:
public static Hashtable readInTable(String file)
{
Hashtable htable = null;
try
{
FileInputStream fis = new FileInputStream(file);
ObjectInputStream ois = new ObjectInputStream(fis);
htable = (Hashtable) ois.readObject();
}
catch (Exception e)
{
System.out.println(e.toString()); }
return htable;
}
What is the simplest way to do this using MIDP without the option of
using the ObjectInputStream? I've been looking at the different input
streams and the RecordStore available in MIDP but because I don't have
a lot of coding experience I'm getting totally lost!
Thanks in advance,
~M
text file and to insert the data into a new hashtable. (The file was
created by writing the contents of a hashtable out to a text file.)
When I was using J2SE, I had a simple method involving:
public static Hashtable readInTable(String file)
{
Hashtable htable = null;
try
{
FileInputStream fis = new FileInputStream(file);
ObjectInputStream ois = new ObjectInputStream(fis);
htable = (Hashtable) ois.readObject();
}
catch (Exception e)
{
System.out.println(e.toString()); }
return htable;
}
What is the simplest way to do this using MIDP without the option of
using the ObjectInputStream? I've been looking at the different input
streams and the RecordStore available in MIDP but because I don't have
a lot of coding experience I'm getting totally lost!
Thanks in advance,
~M