private void registerObjectRead(Object obj,int handle,boolean unshared) throws IOException {
  if (unshared) {
    obj=UNSHARED_OBJ;
  }
  int index=handle - ObjectStreamConstants.baseWireHandle;
  int size=objectsRead.size();
  while (index > size) {
    objectsRead.add(null);
    ++size;
  }
  if (index == size) {
    objectsRead.add(obj);
  }
 else {
    objectsRead.set(index,obj);
  }
}

private void registerObjectRead ( Object obj , int handle , boolean unshared ) throws IOException { if ( unshared ) { obj = UNSHARED_OBJ ; } int index = handle - ObjectStreamConstants . baseWireHandle ; int size = objectsRead . size ( ) ; while ( index > size ) { objectsRead . add ( null ) ; ++ size ; } if ( index == size ) { objectsRead . add ( obj ) ; } else { objectsRead . set ( index , obj ) ; } }
associates a read object with the its serialization handle .
