hi all,
i've a problem about writeUTF method of DataOutputStream. i was trying to write the text from a textarea into a file, and later retrieving the text from that file line by line by using RandomAccessFile, and separate the line into tokens of
string by using StringTokenizer.
however, it seems like that when i write the text like "a,b,1,2" to a file, the actual file becomes sth like " a,b,1,2" (or "*a,b,1,2" or "->a,b,1,2" when i print it to the system.out). so i always get ClassFormatError in runtime when i was trying to tokenize the first character.
i dont know what caused it like that. is it because of the writeUTF method itself? if so, is there any way that i can get rid of the leading space? (i wish i could use sed/tr, but unfortunately i can't
)