API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. PushbackInputStream View Source
Author(s)
David Connelly
Jonathan Payne
Since
JDK1.0
Version
1.43, 06/19/06
Serial
Hierarchy
 Object
      InputStream
          FilterInputStream
              PushbackInputStream
Implements
Subclasses
Description
public class PushbackInputStream
  A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
See also:   
Constructors
public PushbackInputStream (InputStream in)
  Creates a PushbackInputStream and saves its argument, the input stream in, for later use.
public PushbackInputStream (InputStream in, int size)
  Creates a PushbackInputStream with a pushback buffer of the specified size, and saves its argument, the input stream in, for later use.
Methods
Hide/Show inherited methods
public int available () throws IOException [Overrides FilterInputStream]
  Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
publicsynchronized void close () throws IOException [Overrides FilterInputStream]
  Closes this input stream and releases any system resources associated with the stream.
publicsynchronized void mark (int readlimit) [Overrides FilterInputStream]
  Marks the current position in this input stream.
public boolean markSupported () [Overrides FilterInputStream]
  Tests if this input stream supports the mark and reset methods, which it does not.
public int read () throws IOException [Overrides FilterInputStream] [Specified in InputStream]
  Reads the next byte of data from this input stream.
public int read (byte[] b) throws IOException [Inherited From FilterInputStream]
  Reads up to byte.length bytes of data from this input stream into an array of bytes.
public int read (byte[] b, int off, int len) throws IOException [Overrides FilterInputStream]
  Reads up to len bytes of data from this input stream into an array of bytes.
publicsynchronized void reset () throws IOException [Overrides FilterInputStream]
  Repositions this stream to the position at the time the mark method was last called on this input stream.
public long skip (long n) throws IOException [Overrides FilterInputStream]
  Skips over and discards n bytes of data from this input stream.
public void unread (byte[] b) throws IOException
  Pushes back an array of bytes by copying it to the front of the pushback buffer.
public void unread (byte[] b, int off, int len) throws IOException
  Pushes back a portion of an array of bytes by copying it to the front of the pushback buffer.
public void unread (int b) throws IOException
  Pushes back a byte by copying it to the front of the pushback buffer.
Fields
Hide/Show inherited fields
protected byte buf
  The pushback buffer.
protectedvolatile InputStream in [Inherited From FilterInputStream]
The input stream to be filtered.
protected int pos
  The position within the pushback buffer from which the next byte will be read.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar