Code example for ObjectInput

Methods: readBooleanreadObject

0
    } 
     
    @Override 
    public void readExternal(ObjectInput in) throws IOException,
    		ClassNotFoundException {
    	data = (byte[])in.readObject();
    	last = in.readBoolean();
    } 
     
    @Override 
    public void writeExternal(ObjectOutput out) throws IOException {
    	out.writeObject(data);
    	out.writeBoolean(last);
    } 
 
} 
Experience pair programming with AI  Get Codota for Java