Code example for ObjectOutputStream

Methods: reset, writeObject

0
 
	public void test_5_reset() { 
		// Test for method void java.io.ObjectOutputStream.reset() 
		try { 
			String o = "HelloWorld";
			oos.writeObject(o);
			oos.writeObject(o);
			oos.reset();
			oos.writeObject(o);
			ois = new ObjectInputStream(loadStream());
			ois.close();
		} catch (IOException e) {
			fail("IOException serializing data : " + e.getMessage());
		} 
	} 
 
	public void test_6_write() { 
		// Test for method void java.io.ObjectOutputStream.write(byte [], int, 
		// int) 
		try { 
			byte[] buf = new byte[255];