private PDFObject readArray(int objNum,int objGen,PDFDecrypter decrypter) throws IOException {
  ArrayList<PDFObject> ary=new ArrayList<PDFObject>();
  PDFObject obj;
  while ((obj=readObject(objNum,objGen,decrypter)) != null) {
    ary.add(obj);
  }
  if (buf.get() != ']') {
    throw new PDFParseException("Array should end with ']'");
  }
  PDFObject[] objlist=new PDFObject[ary.size()];
  for (int i=0; i < objlist.length; i++) {
    objlist[i]=(PDFObject)ary.get(i);
  }
  return new PDFObject(this,PDFObject.ARRAY,objlist);
}

private PDFObject readArray ( int objNum , int objGen , PDFDecrypter decrypter ) throws IOException { ArrayList < PDFObject > ary = new ArrayList < PDFObject > ( ) ; PDFObject obj ; while ( ( obj = readObject ( objNum , objGen , decrypter ) ) != null ) { ary . add ( obj ) ; } if ( buf . get ( ) != ']' ) { throw new PDFParseException ( "Array should end with ']'" ) ; } PDFObject [ ] objlist = new PDFObject [ ary . size ( ) ] ; for ( int i = 0 ; i < objlist . length ; i ++ ) { objlist [ i ] = ( PDFObject ) ary . get ( i ) ; } return new PDFObject ( this , PDFObject . ARRAY , objlist ) ; }
read an [ array ] . the initial [ has already been read . pdfobjects are read until ] .
