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

## org.pdfbox.io
Class PushBackInputStream

    java.lang.Object
      java.io.InputStream
          java.io.FilterInputStream
              java.io.PushbackInputStream
                  org.pdfbox.io.PushBackInputStream

Direct Known Subclasses:
  ByteArrayPushBackInputStream

public class PushBackInputStream
extends PushbackInputStream

A simple subclass that adds a few convience methods.

Version:
  $Revision: 1.4 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Field Summary

Fields inherited from class java.io.PushbackInputStream
`buf, pos`

Fields inherited from class java.io.FilterInputStream
`in`

Constructor Summary
`PushBackInputStream(InputStream input, int size)` Constructor.

Method Summary
`boolean` | `isEOF()` A simple test to see if we are at the end of the stream.
`int` | `peek()` This will peek at the next byte.

Methods inherited from class java.io.PushbackInputStream
`available, close, markSupported, read, read, skip, unread, unread, unread`

Methods inherited from class java.io.FilterInputStream
`mark, read, reset`

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

Constructor Detail

### PushBackInputStream

    public PushBackInputStream(InputStream input,
                               int size)
                        throws IOException

  Constructor.

Parameters:
  `input` - The input stream.
  `size` - The size of the push back buffer.
Throws:
  `IOException` - If there is an error with the stream.

Method Detail

### peek

    public int peek()
             throws IOException

  This will peek at the next byte.

  Returns:
    The next byte on the stream, leaving it as available to read.
  Throws:
    `IOException` - If there is an error reading the next byte.

### isEOF

    public boolean isEOF()
                  throws IOException

  A simple test to see if we are at the end of the stream.

  Returns:
    true if we are at the end of the stream.
  Throws:
    `IOException` - If there is an error reading the next byte.

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