ObjectInputStream Assignment Help

Assignment Help: >> IO Stream - ObjectInputStream

ObjectInputStream:

An ObjectInputStream class should extend the InputStream class and implements the ObjectInput interface. An ObjectInputStream is responsible for reading objects to a stream. A constructor of this class is ObjectInputStream(InputStream inStream) throws the IOException , StreamCorruptedException.

An argument inStream is the input stream from that serialized objects should be read.  The most general used methods in this class are display in Table. They will throw an IOException on error conditions. A Java 2 adds an inner class to ObjectInputStream known as GetField. That facilitates the reading of persistent fields and its use is beyond the scope of this book. Also, the method readLine() was deprecated through Java 2 and should no longer be used.

Methods                                                                    Description

int available()                             Returns the number of bytes that are now available in the input buffer.

void close()                                Closes the invoking stream. Further read attempts will generate an IOException.

int read()                                   Returns an integer representation of the next available byte of input. -1 is returned when the end of the file is encountered.

Boolean readBoolean()                Reads and returns a boolean from the invoking stream.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd