| Modifier and Type | Field and Description |
|---|---|
| private final Map | bfSearchCOSObjectKeyOffsets
Contains all found objects of a brute force search. |
| private boolean | |
| private static final char[] | EOF_MARKER
EOF-marker.
|
| private static final Log | |
| private static final long | |
| private static final char[] | OBJ_MARKER
obj-marker.
|
| private static final char[] | OBJ_STREAM
ObjStream-marker. |
| private static final char[] | TRAILER_MARKER
trailer-marker. |
| private static final char[] | |
| private static final char[] |
| Access | Constructor and Description |
|---|---|
| public | BruteForceParser(RandomAccessRead
input representing the pdf. source, COSDocument the corresponding COS document document)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| private void | |
| private Map | Returns: a map of all offsets for object streamsSearch for all offsets of object streams within the given pdf |
| protected void | bfSearchForObjStreams(XrefTrailerResolver
the trailer resolver of the document trailerResolver, SecurityHandler<? extends ProtectionPolicy> security handler to be used to decrypt encrypted documents securityHandler)Brute force search for all objects streams of a pdf. |
| private boolean | bfSearchForTrailer(COSDictionary
dictionary to be used as trailer dictionary trailer)Brute force search for all trailer marker. |
| protected long | Returns: the offset of the xref entrythe given offset to be searched for xrefOffset)Search for the offset of the given xref table/stream among those found by a brute force search. |
| private List | |
| private List | |
| public boolean | Returns: true if the search was triggeredIndicates wether the brute force search for objects was triggered. |
| private COSObject | |
| private long | Returns: the start position of the found stringthe string to be searched string)Search for the given string. |
| protected Map | Returns: map containing all found objects of a brute force searchReturns all found objects of a brute force search. |
| private boolean | Returns: true if the given dictionary is a root dictionaryTell if the dictionary is a PDF or FDF catalog. |
| private boolean | Returns: true if the given dictionary is an info dictionarythe dictionary to be checked dictionary)Tell if the dictionary is an info dictionary. |
| protected COSDictionary | Returns: the rebuild trailer dictionarythe trailer resolver of the document trailerResolver, SecurityHandler<? extends ProtectionPolicy> security handler to be used to decrypt encrypted documents securityHandler)Rebuild the trailer dictionary if startxref can't be found. |
| private boolean | Returns: true if the root was found, false if not.dictionary to be used as trailer dictionary trailer)Search for the different parts of the trailer dictionary. |
| private long |
| bfSearchCOSObjectKeyOffsets | back to summary |
|---|---|
| private final Map<COSObjectKey, Long> bfSearchCOSObjectKeyOffsets Contains all found objects of a brute force search. | |
| bfSearchTriggered | back to summary |
|---|---|
| private boolean bfSearchTriggered | |
| EOF_MARKER | back to summary |
|---|---|
| private static final char[] EOF_MARKER Hides org. EOF-marker. | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| MINIMUM_SEARCH_OFFSET | back to summary |
|---|---|
| private static final long MINIMUM_SEARCH_OFFSET Hides org. | |
| OBJ_MARKER | back to summary |
|---|---|
| private static final char[] OBJ_MARKER Hides org. obj-marker. | |
| OBJ_STREAM | back to summary |
|---|---|
| private static final char[] OBJ_STREAM ObjStream-marker. | |
| TRAILER_MARKER | back to summary |
|---|---|
| private static final char[] TRAILER_MARKER trailer-marker. | |
| XREF_STREAM | back to summary |
|---|---|
| private static final char[] XREF_STREAM | |
| XREF_TABLE | back to summary |
|---|---|
| private static final char[] XREF_TABLE | |
| BruteForceParser | back to summary |
|---|---|
| public BruteForceParser(RandomAccessRead source, COSDocument document) throws IOException Constructor. Triggers a brute force search for all objects of the document.
| |
| bfSearchForLastEOFMarker | back to summary |
|---|---|
| private long bfSearchForLastEOFMarker() throws IOException Brute force search for the last EOF marker.
| |
| bfSearchForObjects | back to summary |
|---|---|
| private void bfSearchForObjects() throws IOException Brute force search for every object in the pdf.
| |
| bfSearchForObjStreamOffsets | back to summary |
|---|---|
| private Map Search for all offsets of object streams within the given pdf
| |
| bfSearchForObjStreams | back to summary |
|---|---|
| protected void bfSearchForObjStreams(XrefTrailerResolver trailerResolver, SecurityHandler<? extends ProtectionPolicy> securityHandler) throws IOException Brute force search for all objects streams of a pdf.
| |
| bfSearchForTrailer | back to summary |
|---|---|
| private boolean bfSearchForTrailer(COSDictionary trailer) throws IOException Brute force search for all trailer marker.
| |
| bfSearchForXRef | back to summary |
|---|---|
| protected long bfSearchForXRef(long xrefOffset) throws IOException Search for the offset of the given xref table/stream among those found by a brute force search.
| |
| bfSearchForXRefStreams | back to summary |
|---|---|
| private List Brute force search for all /XRef entries (streams).
| |
| bfSearchForXRefTables | back to summary |
|---|---|
| private List Brute force search for all xref entries (tables).
| |
| bfSearchTriggered | back to summary |
|---|---|
| public boolean bfSearchTriggered() Indicates wether the brute force search for objects was triggered.
| |
| compareCOSObjects | back to summary |
|---|---|
| private COSObject compareCOSObjects(COSObject newObject, Long newOffset, COSObject currentObject) | |
| findString | back to summary |
|---|---|
| private long findString(char[] string) throws IOException Search for the given string. The search starts at the current position and returns the start position if the string was found. -1 is returned if there isn't any further occurrence of the given string. After returning the current position is either the end of the string or the end of the input.
| |
| getBFCOSObjectOffsets | back to summary |
|---|---|
| protected Map Returns all found objects of a brute force search.
| |
| isCatalog | back to summary |
|---|---|
| private boolean isCatalog(COSDictionary dictionary) Tell if the dictionary is a PDF or FDF catalog.
| |
| isInfo | back to summary |
|---|---|
| private boolean isInfo(COSDictionary dictionary) Tell if the dictionary is an info dictionary.
| |
| rebuildTrailer | back to summary |
|---|---|
| protected COSDictionary rebuildTrailer(XrefTrailerResolver trailerResolver, SecurityHandler<? extends ProtectionPolicy> securityHandler) throws IOException Rebuild the trailer dictionary if startxref can't be found.
| |
| searchForTrailerItems | back to summary |
|---|---|
| private boolean searchForTrailerItems(COSDictionary trailer) throws IOException Search for the different parts of the trailer dictionary.
| |
| searchNearestValue | back to summary |
|---|---|
| private long searchNearestValue(List<Long> values, long offset) | |