Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module.pdf
Class StreamTokenizer

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.pdf.Tokenizer
          edu.harvard.hul.ois.jhove.module.pdf.StreamTokenizer

    public class StreamTokenizer

extends Tokenizer

Tokenizer subclass which gets data from an object stream.

Author:
  Gary McGath

Field Summary

Fields inherited from class edu.harvard.hul.ois.jhove.module.pdf.Tokenizer
`_ch, _file, PDFDOCENCODING`

Constructor Summary
`StreamTokenizer(java.io.RandomAccessFile file, Stream stream)`

Method Summary
`void` | `backupChar()` Back up a byte so it will be read again.
`protected void` | `initStream(Stream token)` Streams can occur only in files, not in streams, so this should never be called.
`int` | `readChar()` Gets a character from the file, using a buffer.
`void` | `seek(long offset)` Set the Tokenizer to a new position in the stream.
`protected void` | `setStreamOffset(Stream token)` Sets the offset of a Stream to the current file position.

Methods inherited from class edu.harvard.hul.ois.jhove.module.pdf.Tokenizer
`addLanguageCode, getLanguageCodes, getNext, getNext, getOffset, getPDFACompliant, getWSString, readChar1, scanMode, seekReset, setEncrypted, setPDFACompliant`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StreamTokenizer

    public StreamTokenizer(java.io.RandomAccessFile file,
                           Stream stream)

Method Detail

### initStream

    protected void initStream(Stream token)
                       throws java.io.IOException,
                              PdfException

  Streams can occur only in files, not in streams, so this should never be called.

  Specified by:
    `initStream` in class `Tokenizer`
  Throws:
    `java.io.IOException`
    `PdfException`

### readChar

    public int readChar()
                 throws java.io.IOException

  Gets a character from the file, using a buffer.

  Specified by:
    `readChar` in class `Tokenizer`
  Throws:
    `java.io.IOException`

### seek

    public void seek(long offset)
              throws java.io.IOException,
                     PdfException

  Set the Tokenizer to a new position in the stream.

  Specified by:
    `seek` in class `Tokenizer`
  Parameters:
    `offset` - The offset in bytes from the start of the stream.
  Throws:
    `java.io.IOException`
    `PdfException`

### setStreamOffset

    protected void setStreamOffset(Stream token)
                            throws java.io.IOException,
                                   PdfException

  Sets the offset of a Stream to the current file position. Only the file-based tokenizer can do this, so this should never be called.

  Specified by:
    `setStreamOffset` in class `Tokenizer`
  Throws:
    `java.io.IOException`
    `PdfException`

### backupChar

    public void backupChar()

  Back up a byte so it will be read again.

  Specified by:
    `backupChar` in class `Tokenizer`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD