




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





DataInputStream DataOutputStream
-^
DataInputStream– readBoolean()– readByte()– readChar()– readDouble()– readFloat()– readInt()– readLong()– readShort()
-^
DataOutputStream has corresponding writemethods
ObjectInputStream ObjectOutputStream
-^
Since usually our programs do not consist of onlyprimitive data types, we also may wish to read and writeclass objects to streams
-^
We can do this with the ObjectInputStream andObjectOutputStream
-^
In fact, the ObjectInputStream and ObjectOutputStreamclasses provide the same functionality asDataInputStream and DataOutputStream, except theyalso include support for reading and writing object datavia readObject() and writeObject() methods