java.io.PushbackInputStream (JDK 1.0)
This class is a FilterInputStream that implements a one-byte pushback buffer or, in Java 1.1, a pushback buffer of a specified length. The unread() methods "push" bytes back into the stream--these bytes are the first ones read by the next call to a read() method. This class is sometimes useful when writing parsers.
See also PushbackReader.
public classPushbackInputStreamextends FilterInputStream { //Public Constructors1.1 publicPushbackInputStream(InputStreamin, intsize); publicPushbackInputStream(InputStreamin); //Protected Instance Variables1.1 protected byte[]buf; 1.1 protected intpos; //Public Instance Methodspublic intavailable() throws IOException; //Overrides FilterInputStreampublic booleanmarkSupported(); //Overrides FilterInputStreampublic intread() throws IOException; //Overrides FilterInputStreampublic intread(byte[]b, intoff, intlen) throws IOException; //Overrides FilterInputStreampublic voidunread(intb) throws IOException; 1.1 public voidunread(byte[]b, intoff, intlen) throws IOException; 1.1 public voidunread(byte[]b) throws IOException; }
Hierarchy:
Object->InputStream->FilterInputStream->PushbackInputStream