public class

PooledByteArrayBufferedInputStream

extends InputStream
java.lang.Object
   ↳ java.io.InputStream
     ↳ com.facebook.common.memory.PooledByteArrayBufferedInputStream

Class Overview

InputStream that wraps another input stream and buffers all reads.

For purpose of buffering a byte array is used. It is provided during construction time together with ResourceReleaser responsible for releasing it when the stream is closed.

Summary

Public Constructors
PooledByteArrayBufferedInputStream(InputStream inputStream, byte[] byteArray, ResourceReleaser<byte[]> resourceReleaser)
Public Methods
int available()
void close()
int read()
int read(byte[] buffer, int offset, int length)
long skip(long byteCount)
Protected Methods
void finalize()
[Expand]
Inherited Methods
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Public Constructors

public PooledByteArrayBufferedInputStream (InputStream inputStream, byte[] byteArray, ResourceReleaser<byte[]> resourceReleaser)

Public Methods

public int available ()

Throws
IOException

public void close ()

Throws
IOException

public int read ()

Throws
IOException

public int read (byte[] buffer, int offset, int length)

Throws
IOException

public long skip (long byteCount)

Throws
IOException

Protected Methods

protected void finalize ()

Throws
Throwable