Code example for ObjectInput

Methods: readFullyread

0
	public int hashCode() { 
		return Arrays.hashCode(b);
	} 
 
	public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
		int sz = in.read();
		b = new byte[sz];
		in.readFully(b);
	} 
 
	public void writeExternal(ObjectOutput out) throws IOException {
		out.write(b.length);
		out.write(b);
	} 
 
	public byte[] getBytes() { 
		return b;
	} 
 
	/** 
Experience pair programming with AI  Get Codota for Java