@SuppressWarnings("unchecked") <T>T[] readArray(Class<T> compType) throws ClassNotFoundException, IOException {
  int len=in.readInt();
  T[] arr=(T[])Array.newInstance(compType,len);
  handles.assign(arr);
  for (int i=0; i < len; i++)   arr[i]=(T)readObject();
  return arr;
}

@ SuppressWarnings ( "unchecked" ) < T > T [ ] readArray ( Class < T > compType ) throws ClassNotFoundException , IOException { int len = in . readInt ( ) ; T [ ] arr = ( T [ ] ) Array . newInstance ( compType , len ) ; handles . assign ( arr ) ; for ( int i = 0 ; i < len ; i ++ ) arr [ i ] = ( T ) readObject ( ) ; return arr ; }
reads array from this stream .
