writeObject OR writeUTF
i have to write a String to ObjectOutput, which method do i use writeUTF or writeObject.if both methods will give same result, then which one will be faster.
[171 byte] By [
has_stara] at [2007-10-2 21:19:13]

ObjectOutput is just an iface, so everything is possible. With ObjectOutputStream I expect using writeObject to be a little bit slower, except in cases the String was already written, in which it's can be much faster if the String is very long. I would not care much about the diffrence.