Menu

#10 LittleEndianInputStream readStringUnicode bug

open
nobody
None
5
2005-01-18
2005-01-18
Anonymous
No

The method readStringUnicode read all buffer length but
not stop when char = 0. like in readUnicodeSz. When i
display or use String result it contain undesirable
additional char(0).

I purpose to change readStringUnicode method to the
next one :

public final String readStringUnicode() throws
IOException {
byte flag = readByte();
if (flag == LittleEndianOutputStream.FLAGS_NULL) {
return null;
}
int length = readInt();
return readUnicodeSz(length);
}

thks for your attention,

Bart L. (doc_alton2004@yahoo.fr)

Discussion


Log in to post a comment.