Code example for ObjectInput

Methods: readIntread

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);
	} 
 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java