Java.io.ObjectInputStream readStreamHeader() Method


Advertisements


Description

The java.io.ObjectInputStream.readStreamHeader() method is provided to allow subclasses to read and verify their own stream headers. It reads and verifies the magic number and version number.

Declaration

Following is the declaration for java.io.ObjectInputStream.readStreamHeader() method.

protected void readStreamHeader()

Parameters

NA

Return Value

This method does not return a value.

Exception

  • StreamCorruptedException − If control information in the stream is inconsistent.

  • IOException − If there are I/O errors while reading from the underlying InputStream.


java_io_objectinputstream.htm

Advertisements