Package com.tom_roush.pdfbox.pdfparser
Class FDFParser
- java.lang.Object
-
- com.tom_roush.pdfbox.pdfparser.BaseParser
-
- com.tom_roush.pdfbox.pdfparser.COSParser
-
- com.tom_roush.pdfbox.pdfparser.FDFParser
-
public class FDFParser extends COSParser
-
-
Field Summary
-
Fields inherited from class com.tom_roush.pdfbox.pdfparser.BaseParser
A, ASCII_CR, ASCII_LF, B, D, DEF, document, E, ENDOBJ_STRING, ENDSTREAM_STRING, J, M, N, O, R, S, seqSource, STREAM_STRING, T
-
Fields inherited from class com.tom_roush.pdfbox.pdfparser.COSParser
ENDOBJ, ENDSTREAM, EOF_MARKER, fileLen, initialParseDone, OBJ_MARKER, securityHandler, source, SYSPROP_EOFLOOKUPRANGE, SYSPROP_PARSEMINIMAL, TMP_FILE_PREFIX, xrefTrailerResolver
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidparse()This will parse the stream and populate the COSDocument object.-
Methods inherited from class com.tom_roush.pdfbox.pdfparser.BaseParser
isClosing, isClosing, isDigit, isDigit, isEndOfName, isEOL, isEOL, isSpace, isSpace, isWhitespace, isWhitespace, parseBoolean, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSString, parseDirObject, readExpectedChar, readExpectedString, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, skipSpaces, skipWhiteSpace
-
Methods inherited from class com.tom_roush.pdfbox.pdfparser.COSParser
getDocument, getStartxrefOffset, isLenient, lastIndexOf, parseCOSStream, parseDictObjects, parseFDFHeader, parseObjectDynamically, parseObjectDynamically, parsePDFHeader, parseStartXref, parseTrailer, parseTrailerValuesDynamically, parseXref, parseXrefStream, parseXrefTable, rebuildTrailer, setEOFLookupRange, setLenient
-
-
-
-
Constructor Detail
-
FDFParser
public FDFParser(String filename) throws IOException
Constructs parser for given file using memory buffer.- Parameters:
filename- the filename of the pdf to be parsed- Throws:
IOException- If something went wrong.
-
FDFParser
public FDFParser(File file) throws IOException
Constructs parser for given file using given buffer for temporary storage.- Parameters:
file- the pdf to be parsed- Throws:
IOException- If something went wrong.
-
FDFParser
public FDFParser(InputStream input) throws IOException
Constructor.- Parameters:
input- input stream representing the pdf.- Throws:
IOException- If something went wrong.
-
-
Method Detail
-
parse
public void parse() throws IOExceptionThis will parse the stream and populate the COSDocument object. This will close the stream when it is done parsing.- Throws:
IOException- If there is an error reading from the stream or corrupt data is found.
-
-