java.lang.Object | ||
↳ | java.io.InputStream | |
↳ | com.facebook.common.memory.PooledByteBufferInputStream |
An InputStream implementation over a PooledByteBuffer
instance
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PooledByteBufferInputStream(PooledByteBuffer pooledByteBuffer)
Creates a new inputstream instance over the specific buffer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
available()
Returns the number of bytes still available to read
| ||||||||||
void |
mark(int readlimit)
Sets a mark position in this inputstream.
| ||||||||||
boolean | markSupported() | ||||||||||
int | read() | ||||||||||
int |
read(byte[] buffer, int offset, int length)
Reads at most
length bytes from this stream and stores them in byte array buffer starting at offset . | ||||||||||
int | read(byte[] buffer) | ||||||||||
void |
reset()
Resets this stream to the last marked location.
| ||||||||||
long |
skip(long byteCount)
Skips byteCount (or however many bytes are available) bytes in the stream
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.InputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.lang.AutoCloseable
|
Creates a new inputstream instance over the specific buffer.
pooledByteBuffer | the buffer to read from |
---|
Returns the number of bytes still available to read
Sets a mark position in this inputstream. The parameter readlimit
is ignored. Sending
reset()
will reposition the stream back to the marked position.
readlimit | ignored. |
---|
Reads at most length
bytes from this stream and stores them in byte array buffer
starting at offset
.
buffer | the buffer to read data into |
---|---|
offset | start offset in the buffer |
length | max number of bytes to read |
Resets this stream to the last marked location. This implementation resets the position to either the marked position, the start position supplied in the constructor or 0 if neither has been provided.
Skips byteCount (or however many bytes are available) bytes in the stream
byteCount | number of bytes to skip |
---|