Code example for ObjectInput

Methods: read, readInt

0
		out.writeInt(bytes.length);
		out.write(bytes);
	} 
 
	public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
		int len = in.readInt();
		byte[] bytes = new byte [len];
		in.read(bytes);
		id = new String(bytes);
	} 
 
 
}