PDF Clown
0.1.2

org.pdfclown.tokens
Class FileParser

java.lang.Object
  extended by org.pdfclown.util.parsers.PostScriptParser
      extended by org.pdfclown.tokens.BaseParser
          extended by org.pdfclown.tokens.FileParser
All Implemented Interfaces:
Closeable

public final class FileParser
extends BaseParser

PDF file parser [PDF:1.7:3.2,3.4].

Since:
0.1.1
Version:
0.1.2, 09/24/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Nested Class Summary
 class FileParser.Reference
           
 
Nested classes/interfaces inherited from class org.pdfclown.util.parsers.PostScriptParser
PostScriptParser.TokenTypeEnum
 
Method Summary
 File getFile()
           
 boolean moveNext()
          Moves the pointer to the next token.
 PdfDataObject parsePdfObject()
          Parses the current PDF object [PDF:1.6:3.2].
 String retrieveVersion()
          Retrieves the PDF version of the file [PDF:1.6:3.4.1].
 long retrieveXRefOffset()
          Retrieves the starting position of the last xref-table section [PDF:1.6:3.4.4].
 
Methods inherited from class org.pdfclown.tokens.BaseParser
parsePdfObject
 
Methods inherited from class org.pdfclown.util.parsers.PostScriptParser
close, finalize, getHex, getLength, getPosition, getStream, getToken, getToken, getTokenType, hashCode, isDelimiter, isEOL, isWhitespace, moveNext, seek, setToken, setTokenType, skip, skipEOL, skipWhitespace
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFile

public File getFile()

moveNext

public boolean moveNext()
Description copied from class: PostScriptParser
Moves the pointer to the next token.

To properly parse the current token, the pointer MUST be just before its starting (leading whitespaces are ignored). When this method terminates, the pointer IS at the last byte of the current token.

Overrides:
moveNext in class BaseParser
Returns:
Whether a new token was found.

parsePdfObject

public PdfDataObject parsePdfObject()
Description copied from class: BaseParser
Parses the current PDF object [PDF:1.6:3.2].

Overrides:
parsePdfObject in class BaseParser

retrieveVersion

public String retrieveVersion()
Retrieves the PDF version of the file [PDF:1.6:3.4.1].


retrieveXRefOffset

public long retrieveXRefOffset()
Retrieves the starting position of the last xref-table section [PDF:1.6:3.4.4].


PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.