public class StartXRefScanner extends Object
If the number component ends at the literal end of the file (e.g. the file is truncated or malformed), the startxref will not be reported.
There may be false positives, especially in adversarial settings. For example, there may be a startxref string in a comment or inside a stream or object.
The good parts come directly from PDFBox.
| Constructor and Description |
|---|
StartXRefScanner(org.apache.pdfbox.io.RandomAccessRead source) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isEOL(int c)
This will tell if the next byte to be read is an end of line byte.
|
protected boolean |
isWhitespace(int c) |
protected long |
readLong() |
protected StringBuilder |
readStringNumber()
This method is used to read a token by the readLong() method.
|
List<StartXRefOffset> |
scan() |
protected void |
skipSpaces()
This will skip all spaces and comments that are present.
|
protected void |
skipWhiteSpaces() |
public StartXRefScanner(org.apache.pdfbox.io.RandomAccessRead source)
public List<StartXRefOffset> scan() throws IOException
IOExceptionprotected void skipWhiteSpaces()
throws IOException
IOExceptionprotected boolean isWhitespace(int c)
protected long readLong()
throws IOException
IOExceptionprotected void skipSpaces()
throws IOException
IOException - If there is an error reading from the stream.protected final StringBuilder readStringNumber() throws IOException
IOException - throws by the source methods.protected boolean isEOL(int c)
c - The character to check against end of lineCopyright © 2007–2024 The Apache Software Foundation. All rights reserved.