76
Java ObjectInputStream readByte() Method
The readByte() method of Java ObjectInputStream class is used to read an 8-bit byte.
Syntax
Parameter
No parameter is passed.
Returns
The 8-bit byte read.
Throws
EOFException – If the end of file is reached.
IOException – If other I/O error has occurred.
Example 1
Output:
65 0 0 68 69
Example 2
Output:
106 97 118 97 84 112 111 105 110 116
Next TopicJava ObjectInputStream