PDFLexer
Overview
PDFLexer is a class in Aspose.PDF FOSS for Java.
PDF tokenizer: converts a byte stream into a sequence of PDF tokens.
This class provides 6 methods for working with PDFLexer objects in Java programs.
Available methods include: PDFLexer, clearPeek, getPosition, nextToken, peekToken, skipWhitespaceAndComments.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: position.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
position | long | Read | Returns the current byte position in the underlying reader. |
Methods
| Signature | Description |
|---|---|
PDFLexer(reader: RandomAccessReader) | Constructs a new PDFLexer reading from the given source. |
nextToken() → Token | Reads and returns the next token from the input, consuming it. |
peekToken() → Token | Returns the next token without consuming it. |
getPosition() → long | Returns the current byte position in the underlying reader. |
clearPeek() | Clears any peeked (buffered) token. |
skipWhitespaceAndComments() | Skips whitespace characters and comments. |