PushbackInputStream.read

Reads up to <code>len</code> bytes of data from this input stream into an array of bytes. This method first reads any pushed-back bytes; after that, if fewer than <code>len</code> bytes have been read then it reads from the underlying input stream. If <code>len</code> is not zero, the method blocks until at least 1 byte of input is available; otherwise, no bytes are read and <code>0</code> is returned.

@param b the buffer into which the data is read. @param off the start offset inputStream the destination array <code>b</code> @param len the maximum number of bytes read. @return the total number of bytes read into the buffer, or <code>-1</code> if there is no more data because the end of the stream has been reached. @exception NullPointerException If <code>b</code> is <code>null</code>. @exception IndexOutOfBoundsException If <code>off</code> is negative, <code>len</code> is negative, or <code>len</code> is greater than <code>b.length - off</code> @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(byte[], int, int)

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

Meta