Javatpoint Logo
Javatpoint Logo

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

Test it Now

Output:

65 0 0 68 69

Example 2

Test it Now

Output:

106 97 118 97 84 112 111 105 110 116





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA