Code example for ObjectInput

Methods: read, readInt

0
            reply = true;
        } 
 
        public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
            reply = true;
            int length = in.readInt();
            uuid = new byte[length];
            in.read(uuid, 0, length);
            length = in.readInt();
            rpcId = new byte[length];
            in.read(rpcId, 0, length);
        } 
 
        public void writeExternal(ObjectOutput out) throws IOException {
            out.writeInt(uuid.length);
            out.write(uuid, 0, uuid.length);
            out.writeInt(rpcId.length);
            out.write(rpcId, 0, rpcId.length);
        } 
    }