Package org.verapdf.parser
Class PDFParser
- java.lang.Object
-
- org.verapdf.parser.BaseParser
-
- org.verapdf.parser.COSParser
-
- org.verapdf.parser.PDFParser
-
public class PDFParser extends COSParser
- Author:
- Timur Kamalov
-
-
Field Summary
-
Fields inherited from class org.verapdf.parser.COSParser
document, flag, integers, keyOfCurrentObject, LINEARIZATION_DICTIONARY_LOOKUP_SIZE, objects
-
Fields inherited from class org.verapdf.parser.BaseParser
source
-
-
Constructor Summary
Constructors Constructor Description PDFParser(InputStream fileStream)PDFParser(String filename)PDFParser(COSDocument document, InputStream fileStream)PDFParser(COSDocument document, String filename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSObjectgetEncryption()COSHeadergetHeader()LonggetLastTrailerOffset()COSObjectgetObject(long offset)SeekableInputStreamgetPDFSource()voidgetXRefInfo(List<COSXRefInfo> infos)booleanisEncrypted()booleanisLinearized()protected voidparseXrefTable(COSXRefSection xrefs)-
Methods inherited from class org.verapdf.parser.COSParser
getArray, getDictionary, getDocument, getName, getStream, nextObject
-
Methods inherited from class org.verapdf.parser.BaseParser
appendToToken, clearToken, closeInputStream, findKeyword, findKeyword, getLine, getLine, getLineBytes, getRandomAccess, getRawBytes, getToken, initializeToken, isCR, isDigit, isDigit, isEOL, isFF, isHexDigit, isLF, isNextByteEOL, nextLine, nextToken, readName, readNumber, readUntilDelimiter, skipExpectedCharacter, skipSingleEol, skipSingleSpace, skipSingleSpace, skipSpaces, skipSpaces
-
-
-
-
Constructor Detail
-
PDFParser
public PDFParser(String filename) throws IOException
- Throws:
IOException
-
PDFParser
public PDFParser(InputStream fileStream) throws IOException
- Throws:
IOException
-
PDFParser
public PDFParser(COSDocument document, String filename) throws IOException
- Throws:
IOException
-
PDFParser
public PDFParser(COSDocument document, InputStream fileStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getHeader
public COSHeader getHeader() throws IOException
- Throws:
IOException
-
getPDFSource
public SeekableInputStream getPDFSource()
-
isLinearized
public boolean isLinearized()
-
getXRefInfo
public void getXRefInfo(List<COSXRefInfo> infos) throws IOException
- Throws:
IOException
-
getObject
public COSObject getObject(long offset) throws IOException
- Throws:
IOException
-
parseXrefTable
protected void parseXrefTable(COSXRefSection xrefs) throws IOException
- Throws:
IOException
-
isEncrypted
public boolean isEncrypted()
-
getEncryption
public COSObject getEncryption()
-
getLastTrailerOffset
public Long getLastTrailerOffset()
-
-