Thomas Mueller

Greenhorn
+ Follow
since Aug 03, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Thomas Mueller

I think you should test the application using suns
Java2 Runtime Envirionment (jre) and not a jdk.
hey rahel
I did this:
... readRecord(){ ...
rv[i] = new String(buffer, offset, description[i].getLength(),ENCODING);
...
instead of this:
//rv[i] = new String(buffer, 0, offset, description[i].getLength());(
And for the method writeRecord I changed this:
...
//newData[i].getBytes(0, toCopy, buffer, offset);
...
to this:
...
byte [] encodedBuffer = null;
...
encodedBuffer = newData[i].getBytes(ENCODING);
for (int j = 0;j < encodedBuffer.length && j < toCopy ;j++)
{
buffer[j + offset] = encodedBuffer[j];
}
...
I tried to ceep the solution as close as possible to the original code.
It works, but I'm not shure if use the correct encoding.
...
private static final String ENCODING = "UTF-8";
...