private Object readHandle(boolean unshared) throws IOException {
  if (bin.readByte() != TC_REFERENCE) {
    throw new InternalError();
  }
  passHandle=bin.readInt() - baseWireHandle;
  if (passHandle < 0 || passHandle >= handles.size()) {
    throw new StreamCorruptedException(String.format("invalid handle value: %08X",passHandle + baseWireHandle));
  }
  if (unshared) {
    throw new InvalidObjectException("cannot read back reference as unshared");
  }
  Object obj=handles.lookupObject(passHandle);
  if (obj == unsharedMarker) {
    throw new InvalidObjectException("cannot read back reference to unshared object");
  }
  return obj;
}

private Object readHandle ( boolean unshared ) throws IOException { if ( bin . readByte ( ) != TC_REFERENCE ) { throw new InternalError ( ) ; } passHandle = bin . readInt ( ) - baseWireHandle ; if ( passHandle < 0 || passHandle >= handles . size ( ) ) { throw new StreamCorruptedException ( String . format ( "invalid handle value: %08X" , passHandle + baseWireHandle ) ) ; } if ( unshared ) { throw new InvalidObjectException ( "cannot read back reference as unshared" ) ; } Object obj = handles . lookupObject ( passHandle ) ; if ( obj == unsharedMarker ) { throw new InvalidObjectException ( "cannot read back reference to unshared object" ) ; } return obj ; }
reads in object handle , sets passhandle to the read handle , and returns object associated with the handle .
