- buffer
- the buffer containing the bytes to push back to this stream.
- offset
- the index of the first byte in buffer to push back.
- length
- the number of bytes to push back.
Type Reason Java.Lang.IndexOutOfBoundsException if offset or length , or if offset + length is greater than the length of buffer. Java.IO.IOException if the free space in the internal pushback buffer is not sufficient to store the selected contents of buffer.
Pushes a subset of the bytes in buffer back to this stream. The subset is defined by the start position offset within buffer and the number of bytes specified by length. The bytes are pushed back in such a way that the next byte read from this stream is buffer[offset], then buffer[1] and so on.
If this stream's internal pushback buffer cannot store the selected subset of buffer, an IOException is thrown. Parts of buffer may have already been copied to the pushback buffer when the exception is thrown.