public static BigInt[] readArrayOfSizeBigInts(InputStream in) throws IOException {
  Vector A=new Vector();
  int i=0;
  try {
    do {
      A.addElement(readSizeBigInt(in));
      i++;
    }
 while (true);
  }
 catch (  IOException e) {
  }
  BigInt[] bA=new BigInt[i];
  for (int j=0; j < i; j++)   bA[j]=(BigInt)A.elementAt(j);
  return bA;
}

public static BigInt [ ] readArrayOfSizeBigInts ( InputStream in ) throws IOException { Vector A = new Vector ( ) ; int i = 0 ; try { do { A . addElement ( readSizeBigInt ( in ) ) ; i ++ ; } while ( true ) ; } catch ( IOException e ) { } BigInt [ ] bA = new BigInt [ i ] ; for ( int j = 0 ; j < i ; j ++ ) bA [ j ] = ( BigInt ) A . elementAt ( j ) ; return bA ; }
reads in as many ( size byte [ ] ) pairs as it can and returns an array of bigints corresponding to the byte [ ] s . input : in should contain some sequence of ( size byte [ ] ) pairs that are consistent , i . e . there really are size bytes in the stream , otherwise a runtimeexception is thrown
