question: private Object parseObject ( ) throws PDFParseException { final Tok t = nextToken ( ) ; switch ( t . type ) { case Tok . NUM : return new Double ( tok . value ) ; case Tok . STR : case Tok . NAME : return tok . name ; case Tok . BRKB : { final HashMap < String , PDFObject > hm = new HashMap < String , PDFObject > ( ) ; String name = null ; for ( Object obj = null ; ( obj = parseObject ( ) ) != null ; ) { if ( name == null ) { name = ( String ) obj ; } else { hm . put ( name , new PDFObject ( obj ) ) ; name = null ; } } if ( tok . type != Tok . BRKE ) { throw new PDFParseException ( "Inline dict should have ended with '>>'" ) ; } return hm ; } case Tok . ARYB : { final ArrayList < Object > ary = new ArrayList < Object > ( ) ; for ( Object obj = null ; ( obj = parseObject ( ) ) != null ; ) { ary . add ( obj ) ; } if ( tok . type != Tok . ARYE ) { throw new PDFParseException ( "Expected ']'" ) ; } return ary . toArray ( ) ; } case Tok . CMD : return t ; } if ( ! RELEASE ) { debug ( "**** WARNING! parseObject unknown token! (t.type=" + t . type + ") *************************" , 4 ) ; } return null ; }
target:  Parse the next object out of the PDF stream.  This could be a Double, a String, a HashMap (dictionary), Object[] array, or a Tok containing a PDF command.