Write unicode into file
I want to write into file in persian
Which class is better to use RandomAccessFile , FileWriter or FileOutputStream
or DataOutPut or What ....?
I write my code in two manner
1) for(int i=0;i<myStr.Length();i++) fos.writeUTF(myStr.charAt(i));
But does not work
What should i do ?
U can write in a file in bytes..that would solve the format problem.
Use the method writeTo() of the class ByteArrayOutputStream.
Writing in the file is easy..u will have to find a way to read in the right way from the file.