java.lang.Object
java.io.InputStream
io.fusionauth.http.io.PushbackInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An input stream that allows a portion of bytes read into a buffer to be pushed back to be read again.
- Author:
- Daniel DeGroff
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
PushbackInputStream
-
-
Method Details
-
getAvailableBufferedBytesRemaining
public int getAvailableBufferedBytesRemaining() -
push
public void push(byte[] buffer, int offset, int length) Push back the bytes found in the provided buffer.- Parameters:
buffer- the buffer that contains bytes that should be pushed back into the stream.offset- the offset into the buffer where a read should startlength- the length of bytes starting from the offset that are available to be read
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-