java.lang.Object |
↳ |
com.facebook.common.memory.PooledByteStreams |
Class Overview
Helper class for interacting with java streams, similar to guava's ByteSteams. To prevent
numerous allocations of temp buffers pool of byte arrays is used.
Summary
Public Methods |
long
|
copy(InputStream from, OutputStream to)
Copy all bytes from InputStream to OutputStream.
|
long
|
copy(InputStream from, OutputStream to, long bytesToCopy)
Copy at most number of bytes from InputStream to OutputStream.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
PooledByteStreams
(ByteArrayPool byteArrayPool, int tempBufSize)
Public Methods
public
long
copy
(InputStream from, OutputStream to)
Copy all bytes from InputStream to OutputStream.
Parameters
from |
InputStream |
to |
OutputStream |
public
long
copy
(InputStream from, OutputStream to, long bytesToCopy)
Copy at most number of bytes from InputStream to OutputStream.
Parameters
from |
InputStream |
to |
OutputStream |
bytesToCopy |
bytes to copy |