E
Eren Aykin
Hi, I want to serialize and write an arraylist to a file, but the
problem is the strings in the arraylist needs to be encoded in
"windows-1254".
My current code is like:
FileOutputStream fout2= new FileOutputStream("C:\\vocabulary.txt");
ObjectOutputStream out2= new ObjectOutputStream(fout2);
out2.writeObject(vocArray); // vocArray is an arraylist
The words in the vocArray have some foreign language characters and
I've problem writing them to a file.
I know that OutputStreamWriter allows us to define encoding type so I
can write:
OutputStreamWriter osw2 = new OutputStreamWriter(out2,"windows-1254");
But I don't know how to write the arraylist object with a specific
encoding type.
Could anybody help me with this problem?
problem is the strings in the arraylist needs to be encoded in
"windows-1254".
My current code is like:
FileOutputStream fout2= new FileOutputStream("C:\\vocabulary.txt");
ObjectOutputStream out2= new ObjectOutputStream(fout2);
out2.writeObject(vocArray); // vocArray is an arraylist
The words in the vocArray have some foreign language characters and
I've problem writing them to a file.
I know that OutputStreamWriter allows us to define encoding type so I
can write:
OutputStreamWriter osw2 = new OutputStreamWriter(out2,"windows-1254");
But I don't know how to write the arraylist object with a specific
encoding type.
Could anybody help me with this problem?