Code example for ObjectInputStream

Methods: closereadBytereadObject

                (byte) 5, (byte) 0x79, (byte) 0x74, (byte) 0, (byte) 1, 
                (byte) 'R', (byte) 0x79, (byte) 0x77, (byte) 1, (byte) 24 }; 
        assertTrue("incorrect output", Arrays.equals(input, result));
        ois = new ObjectInputStreamSubclass(loadStream());
        assertEquals("Wrong result from readObject()", "R", ois.readObject());
        assertEquals("Wrong result from readByte()", 24, ois.readByte());
	private static class ResolveObjectTest implements Serializable {
		Object field1, field2;
	private static class ResolveObjectInputStream extends ObjectInputStream {
		ResolveObjectInputStream(InputStream in)
				throws StreamCorruptedException, IOException { 
Connect your IDE to all the code out there  Get Codota for Java