com.android.volley.toolbox
クラス PoolingByteArrayOutputStream

java.lang.Object
  上位を拡張 java.io.OutputStream
      上位を拡張 java.io.ByteArrayOutputStream
          上位を拡張 com.android.volley.toolbox.PoolingByteArrayOutputStream
すべての実装されたインタフェース:
java.io.Closeable, java.io.Flushable

public class PoolingByteArrayOutputStream
extends java.io.ByteArrayOutputStream

A variation of ByteArrayOutputStream that uses a pool of byte[] buffers instead of always allocating them fresh, saving on heap churn.


コンストラクタの概要
PoolingByteArrayOutputStream(ByteArrayPool pool)
          Constructs a new PoolingByteArrayOutputStream with a default size.
PoolingByteArrayOutputStream(ByteArrayPool pool, int size)
          Constructs a new ByteArrayOutputStream with a default size of size bytes.
 
メソッドの概要
 void close()
           
 void finalize()
           
 void write(byte[] buffer, int offset, int len)
           
 void write(int oneByte)
           
 
クラス java.io.ByteArrayOutputStream から継承されたメソッド
reset, size, toByteArray, toString, toString, toString, writeTo
 
クラス java.io.OutputStream から継承されたメソッド
flush, write
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

PoolingByteArrayOutputStream

public PoolingByteArrayOutputStream(ByteArrayPool pool)
Constructs a new PoolingByteArrayOutputStream with a default size. If more bytes are written to this instance, the underlying byte array will expand.


PoolingByteArrayOutputStream

public PoolingByteArrayOutputStream(ByteArrayPool pool,
                                    int size)
Constructs a new ByteArrayOutputStream with a default size of size bytes. If more than size bytes are written to this instance, the underlying byte array will expand.

パラメータ:
size - initial size for the underlying byte array. The value will be pinned to a default minimum size.
メソッドの詳細

close

public void close()
           throws java.io.IOException
定義:
インタフェース java.io.Closeable 内の close
オーバーライド:
クラス java.io.ByteArrayOutputStream 内の close
例外:
java.io.IOException

finalize

public void finalize()
オーバーライド:
クラス java.lang.Object 内の finalize

write

public void write(byte[] buffer,
                  int offset,
                  int len)
オーバーライド:
クラス java.io.ByteArrayOutputStream 内の write

write

public void write(int oneByte)
オーバーライド:
クラス java.io.ByteArrayOutputStream 内の write