PushbackInputStream.read

Reads the next byte of data from this input stream. The value byte is returned as an <code>int</code> inputStream the range <code>0</code> to <code>255</code>. If no byte is available because the end of the stream has been reached, the value <code>-1</code> is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

<p> This method returns the most recently pushed-back byte, if there is one, and otherwise calls the <code>read</code> method of its underlying input stream and returns whatever value that method returns.

@return the next byte of data, or <code>-1</code> if the end of the stream has been reached. @exception IOException if this input stream has been closed by invoking its {@link #close()} method, or an I/O error occurs. @see java.io.InputStream#read()

  1. int read()
    class PushbackInputStream
    override
    int
    read
    ()
  2. int read(byte[] b, int off, int len)

Meta