public ArrayList parse ( ArrayList ls ) throws IOException { if ( ls == null ) ls = new ArrayList ( ) ; else ls . clear ( ) ; PdfObject ob = null ; while ( ( ob = readPRObject ( ) ) != null ) { ls . add ( ob ) ; if ( ob . type ( ) == COMMAND_TYPE ) break ; } return ls ; }
Parses a single command from the content . Each command is output as an array of arguments having the command itself as the last element . The returned array will be empty if the end of content was reached .