Home » Java ObjectInputStream available() Method with Examples

Java ObjectInputStream available() Method with Examples

by Online Tutorials Library

Java ObjectInputStream available() Method

The available() method of ObjectInputStream class returns the number of bytes that can be read without blocking.

Syntax

Parameter

NA

Returns

The number of available bytes.

Throws

IOException

Example 1

Output:

Hello  0 TutorAspire 

Example 2

Output:

Hello TutorAspire 0  

You may also like