PDFLexer

Overview

PDFLexer is a class in Aspose.Pdf FOSS for Java.

PDF tokenizer: converts a byte stream into a sequence of PDF tokens.

Properties

NameTypeAccessDescription
positionlongReadReturns the current byte position in the underlying reader.

Methods

SignatureDescription
PDFLexer(reader: RandomAccessReader)Constructs a new PDFLexer reading from the given source.
nextToken()TokenReads and returns the next token from the input, consuming it.
peekToken()TokenReturns the next token without consuming it.
getPosition()longReturns the current byte position in the underlying reader.
clearPeek()Clears any peeked (buffered) token.
skipWhitespaceAndComments()Skips whitespace characters and comments.

See Also