com.facebook.common.memory.PooledByteBufferFactory |
Known Indirect Subclasses |
A factory to create instances of PooledByteBuffer and PooledByteBufferOutputStream
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract PooledByteBuffer |
newByteBuffer(InputStream inputStream)
Creates a new bytebuf instance by reading in the entire contents of the input stream
| ||||||||||
abstract PooledByteBuffer |
newByteBuffer(byte[] bytes)
Creates a new bytebuf instance by reading in the entire contents of the byte array
| ||||||||||
abstract PooledByteBuffer |
newByteBuffer(InputStream inputStream, int initialCapacity)
Creates a new PooledByteBuffer instance with an initial capacity, and reading the entire
contents of the input stream
| ||||||||||
abstract PooledByteBuffer |
newByteBuffer(int size)
Creates a new PooledByteBuffer instance of given size.
| ||||||||||
abstract PooledByteBufferOutputStream |
newOutputStream()
Creates a new PooledByteBufferOutputStream instance with default initial capacity
| ||||||||||
abstract PooledByteBufferOutputStream |
newOutputStream(int initialCapacity)
Creates a new PooledByteBufferOutputStream instance with the specified initial capacity
|
Creates a new bytebuf instance by reading in the entire contents of the input stream
inputStream | the input stream to read from |
---|
IOException |
---|
Creates a new bytebuf instance by reading in the entire contents of the byte array
bytes | the byte array to read from |
---|
Creates a new PooledByteBuffer instance with an initial capacity, and reading the entire contents of the input stream
inputStream | the input stream to read from |
---|---|
initialCapacity | initial allocation size for the bytebuf |
IOException |
---|
Creates a new PooledByteBuffer instance of given size.
size | in bytes |
---|
Creates a new PooledByteBufferOutputStream instance with default initial capacity
Creates a new PooledByteBufferOutputStream instance with the specified initial capacity
initialCapacity | initial allocation size for the underlying output stream |
---|