Code example for ObjectOutput

Methods: writeByte

0
  { 
    if (manager == null)
      { 
        throw new IOException("no connection");
      } 
    manager.write(out);
    objid.write(out);
    // This byte is somewhat confusing when interoperating with JDK 
    out.writeByte(0); // RETURN_ACK);
  } 
 
  public void readExternal(ObjectInput in) throws IOException,
      ClassNotFoundException 
  { 
    manager = UnicastConnectionManager.read(in);
    objid = ObjID.read(in);
    byte ack = in.readByte();
    // This byte is somewhat confusing when interoperating with JDK 
    if (ack != RETURN_ACK && ack != 0/* jdk ack value */)
      { 
        throw new IOException("no ack found");