# org.pdfclown.tokens.FileParser Class Reference

PDF file parser [PDF:1.7:3.2,3.4]. More...

Inheritance diagram for org.pdfclown.tokens.FileParser:

List of all members.

## Classes
struct | Reference
## Public Types
enum | TokenTypeEnum { Keyword, Boolean, Integer, Real, Literal, Hex, Name, Comment, ArrayBegin, ArrayEnd, DictionaryBegin, DictionaryEnd, Null }
## Public Member Functions
void | Dispose ()
override int | GetHashCode ()
object | GetToken (int offset)
| Gets a token after moving to the given offset.
bool | MoveNext (int offset)
| Moves the pointer to the next token.
override bool | MoveNext ()
| Moves the pointer to the next token.
PdfDataObject | ParsePdfObject (int offset)
| Parses a PDF object after moving to the given token offset.
override PdfDataObject | ParsePdfObject ()
| Parses the current PDF object [PDF:1.6:3.2].
string | RetrieveVersion ()
| Retrieves the PDF version of the file [PDF:1.6:3.4.1].
long | RetrieveXRefOffset ()
| Retrieves the starting position of the last xref-table section [PDF:1.6:3.4.4].
void | Seek (long offset)
| Moves the pointer to the given absolute byte position.
void | Skip (long offset)
| Moves the pointer to the given relative byte position.
bool | SkipEOL ()
| Moves the pointer before the next non-EOL character after the current position.
bool | SkipWhitespace ()
| Moves the pointer before the next non-whitespace character after the current position.
## Properties
long | Length`[get]`
long | Position`[get]`
IInputStream | Stream`[get]`
object | Token`[get, set]`
| Gets the currently-parsed token.
TokenTypeEnum | TokenType`[get, set]`
| Gets the currently-parsed token type.

##

PDF file parser [PDF:1.7:3.2,3.4].

## Member Enumeration Documentation

enum org::pdfclown::util::parsers::PostScriptParser::TokenTypeEnum`[inherited]`

Enumerator:

  Keyword |
  Boolean |
  Integer |
  Real |
  Literal |
  Hex |
  Name |
  Comment |
  ArrayBegin |
  ArrayEnd |
  DictionaryBegin |
  DictionaryEnd |
  Null |

## Member Function Documentation

void org.pdfclown.util.parsers.PostScriptParser.Dispose | ( |  | ) | `[inherited]`

override int org.pdfclown.util.parsers.PostScriptParser.GetHashCode | ( |  | ) | `[inherited]`

References org.pdfclown.bytes.IInputStream.GetHashCode().

object org.pdfclown.util.parsers.PostScriptParser.GetToken | ( | int | offset | ) | `[inherited]`

Gets a token after moving to the given offset.

Parameters:

  | offset | Number of tokens to skip before reaching the intended one.

See also:
  Token

bool org.pdfclown.util.parsers.PostScriptParser.MoveNext | ( | int | offset | ) | `[inherited]`

Moves the pointer to the next token.

Parameters:

  | offset | Number of tokens to skip before reaching the intended one.

override bool org.pdfclown.tokens.FileParser.MoveNext | ( |  | ) | `[virtual]`

Moves the pointer to the next token.

To properly parse the current token, the pointer MUST be just before its starting (leading whitespaces are ignored). When this method terminates, the pointer IS at the last byte of the current token.

Returns:
  Whether a new token was found.

Reimplemented from org.pdfclown.tokens.BaseParser.

References org.pdfclown.bytes.IInputStream.Position, and org.pdfclown.bytes.IInputStream.Seek().

PdfDataObject org.pdfclown.tokens.BaseParser.ParsePdfObject | ( | int | offset | ) | `[inherited]`

Parses a PDF object after moving to the given token offset.

Parameters:

  | offset | Number of tokens to skip before reaching the intended one.

See also:
  ParsePdfObject()

override PdfDataObject org.pdfclown.tokens.FileParser.ParsePdfObject | ( |  | ) | `[virtual]`

Parses the current PDF object [PDF:1.6:3.2].

Reimplemented from org.pdfclown.tokens.BaseParser.

References org.pdfclown.bytes.IInputStream.Position, org.pdfclown.bytes.IInputStream.Read(), org.pdfclown.objects.PdfDictionary.Resolve(), and org.pdfclown.bytes.IInputStream.Seek().

string org.pdfclown.tokens.FileParser.RetrieveVersion | ( |  | ) |

Retrieves the PDF version of the file [PDF:1.6:3.4.1].

References org.pdfclown.bytes.IInputStream.Position, org.pdfclown.bytes.IInputStream.ReadString(), and org.pdfclown.bytes.IInputStream.Seek().

long org.pdfclown.tokens.FileParser.RetrieveXRefOffset | ( |  | ) |

Retrieves the starting position of the last xref-table section [PDF:1.6:3.4.4].

References org.pdfclown.bytes.IStream.Length, org.pdfclown.bytes.IInputStream.Position, org.pdfclown.bytes.IInputStream.ReadString(), and org.pdfclown.bytes.IInputStream.Seek().

Referenced by org.pdfclown.tokens.CompressedWriter.WriteIncremental().

void org.pdfclown.util.parsers.PostScriptParser.Seek | ( | long | offset | ) | `[inherited]`

Moves the pointer to the given absolute byte position.

void org.pdfclown.util.parsers.PostScriptParser.Skip | ( | long | offset | ) | `[inherited]`

Moves the pointer to the given relative byte position.

bool org.pdfclown.util.parsers.PostScriptParser.SkipEOL | ( |  | ) | `[inherited]`

Moves the pointer before the next non-EOL character after the current position.

Returns:
  Whether the stream can be further read.

bool org.pdfclown.util.parsers.PostScriptParser.SkipWhitespace | ( |  | ) | `[inherited]`

Moves the pointer before the next non-whitespace character after the current position.

Returns:
  Whether the stream can be further read.

## Property Documentation

long org.pdfclown.util.parsers.PostScriptParser.Length`[get, inherited]`

long org.pdfclown.util.parsers.PostScriptParser.Position`[get, inherited]`

IInputStream org.pdfclown.util.parsers.PostScriptParser.Stream`[get, inherited]`

Referenced by org.pdfclown.tokens.PlainWriter.WriteIncremental(), and org.pdfclown.tokens.CompressedWriter.WriteIncremental().

object org.pdfclown.util.parsers.PostScriptParser.Token`[get, set, inherited]`

Gets the currently-parsed token.

TokenTypeEnum org.pdfclown.util.parsers.PostScriptParser.TokenType`[get, set, inherited]`

Gets the currently-parsed token type.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.