Use This
writing to the file
/*getBytes(int srcBegin, int srcEnd,byte[] dst,int dstBegin)
is deprecated method
newData[i].getBytes(0, toCopy, buffer, offset);*/
byte[] utfb =newData[i].getBytes("UTF-8");
for(int j=0;j<utfb.length;j++)>
buffer[offset+j] = utfb[j];
offset += space;
Reading from File
/*
String(byte[] ascii, int hibyte, int offset, int count)
This constructor is deprecated the preferred way to do
this is via the String constructors that take
a character-encoding name
rv[i] = new String(buffer, 0, offset,
description[i].getLength());
*/
rv[i] = new String(buffer, offset,
description[i].getLength(),"UTF-8");
offset += description[i].getLength();
Regards
SMK Reddy