89
Java ObjectInputStream readUTF() Method
The readUTF() method of ObjectInputStream class is used to read a String in UTF(Uniform Text Format) format. It returns the String which is read from objectinputstream in UTF format.
Syntax
Parameter
NA
Returns
The String.
Throws
IOException
UTFDataFormatException
Example 1
Output:
tutorAspire welcome to TutorAspire
Example 2
Output:
Use of readUTF() : Welcome to TutorAspire
Next TopicJava ObjectInputStream