What's the difference between writeUTF and writeChars? (methods of ObjectOutputStream) Further I have not found the corresponding readChars in ObjectInputStream.
writeUTF
writes text in UTF-8 format encoding preceeded with text length, so readUTF
knows how many characters to read from stream.
writeChars
writes text as a sequence of 2-bytes chars with no length. To read it, we should use readChar
method and we need to know how many chars were written.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With