public class BruteForceParser extends COSParser
fileLen, initialParseDone, securityHandler, SYSPROP_EOFLOOKUPRANGE, xrefTrailerResolverA, ASCII_CR, ASCII_LF, B, D, DEF, document, E, ENDOBJ_STRING, ENDSTREAM_STRING, J, M, N, O, R, S, source, STREAM_STRING, T| Constructor and Description |
|---|
BruteForceParser(org.apache.pdfbox.io.RandomAccessRead source,
COSDocument document)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
bfSearchForObjStreams(XrefTrailerResolver trailerResolver,
SecurityHandler<? extends ProtectionPolicy> securityHandler)
Brute force search for all objects streams of a pdf.
|
protected long |
bfSearchForXRef(long xrefOffset)
Search for the offset of the given xref table/stream among those found by a brute force search.
|
boolean |
bfSearchTriggered()
Indicates wether the brute force search for objects was triggered.
|
protected Map<COSObjectKey,Long> |
getBFCOSObjectOffsets()
Returns all found objects of a brute force search.
|
protected COSDictionary |
rebuildTrailer(XrefTrailerResolver trailerResolver,
SecurityHandler<? extends ProtectionPolicy> securityHandler)
Rebuild the trailer dictionary if startxref can't be found.
|
checkPages, createRandomAccessReadView, dereferenceCOSObject, getAccessPermission, getEncryption, isLenient, isString, lastIndexOf, parseCOSStream, parseFDFHeader, parseObjectDynamically, parseObjectStreamObject, parsePDFHeader, parseXrefTable, prepareDecryption, resetTrailerResolver, retrieveTrailer, setEOFLookupRange, setLenientgetObjectKey, isClosing, isClosing, isDigit, isDigit, isEndOfName, isEOF, isEOL, isEOL, isSpace, isSpace, isWhitespace, isWhitespace, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSString, parseDirObject, readExpectedChar, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, skipSpaces, skipWhiteSpacespublic BruteForceParser(org.apache.pdfbox.io.RandomAccessRead source,
COSDocument document)
throws IOException
source - input representing the pdf.document - the corresponding COS documentIOException - if the source data could not be readpublic boolean bfSearchTriggered()
protected Map<COSObjectKey,Long> getBFCOSObjectOffsets() throws IOException
IOException - if something went wrongprotected long bfSearchForXRef(long xrefOffset)
throws IOException
xrefOffset - the given offset to be searched forIOException - if something went wrongprotected void bfSearchForObjStreams(XrefTrailerResolver trailerResolver, SecurityHandler<? extends ProtectionPolicy> securityHandler) throws IOException
trailerResolver - the trailer resolver of the documentsecurityHandler - security handler to be used to decrypt encrypted documentsIOException - if something went wrongprotected COSDictionary rebuildTrailer(XrefTrailerResolver trailerResolver, SecurityHandler<? extends ProtectionPolicy> securityHandler) throws IOException
trailerResolver - the trailer resolver of the documentsecurityHandler - security handler to be used to decrypt encrypted documentsIOException - if something went wrongCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.