ObjectOutput Stream Assignment Help

Assignment Help: >> IO Stream - ObjectOutput Stream

ObjectOutput Stream:

The ObjectOutputStream class extends the OutputStream class and after that implements the ObjectOutput interface. Which is responsible for writing to a stream The constructor of this class is gieven below

ObjectOutputStream (OutputStream outStream) throws IOException

An argument outStream is the output stream to that serialized object will be written.   A most general used method in this class is display in Table. They will throw an IOException on error conditions. A Java 2 adds an inner class to ObjectOutputStream known as Putfield. That is facilitated the writing of persistent fields and its use is beyond the scope of this book.

Methods                                                                    Description

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

void flush()                                 Finalizes  the  output  state  so  that  any buffers are closed. That is, it flushes the output buffers.

void write(byte buffer[])               Writes an array of bytes to the invoking stream.

void write(byte buffer[],int            Writes a subrange of numBytes

offset,int numbytes)                     bytes from the array buffer, beginning at buffer[offset].

void write(int b)                           Writes  a  single  byte  to  the  invoking stream. The byte written is the low-order byte of b.

void writeBoolean(boolean b)        Writes a boolean to the invoking stream.

void writeByte(int b)                     Writes  a  byte  to  the  invoking  stream. The byte written is the low-order byte of b.

void writeBytes(String s)              Writes the bytes repersenting str to the invoking stream.

void writeChar(int c)                    Writes a char to the invoking stream.

void writeChars(String s)             Writes the charcters in str to 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