i need to write to external file.
I got the values to my servlet and used this code for storing to external file but this is not human readable.
Arraylist contains my form values..
public void writeFile(ArrayList al) throws IOException {
String fileString = "IBM.txt";
try {
ObjectOutputStream oos = new ObjectOutputStream(new
FileOutputStream(fileString));
oos.writeObject(al);
oos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
How to write to a file which is readable i mean the exact values which we entered