类 FastByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.alibaba.ageiport.common.io.FastByteArrayOutputStream
- 所有已实现的接口:
Closeable,Flushable,AutoCloseable
-
构造器概要
构造器构造器说明Create a newFastByteArrayOutputStreamwith the default initial capacity of 256 bytes.FastByteArrayOutputStream(int initialBlockSize) Create a newFastByteArrayOutputStreamwith the specified initial capacity. -
方法概要
修饰符和类型方法说明voidclose()voidreset()Reset the contents of thisFastByteArrayOutputStream.voidresize(int targetCapacity) intsize()byte[]byte[]toString()voidwrite(byte[] data, int offset, int length) voidwrite(int datum) voidwriteTo(OutputStream out) Write the buffers content to the given OutputStream.从类继承的方法 java.io.OutputStream
flush, nullOutputStream, write
-
构造器详细资料
-
FastByteArrayOutputStream
public FastByteArrayOutputStream()Create a newFastByteArrayOutputStreamwith the default initial capacity of 256 bytes. -
FastByteArrayOutputStream
public FastByteArrayOutputStream(int initialBlockSize) Create a newFastByteArrayOutputStreamwith the specified initial capacity.- 参数:
initialBlockSize- the initial buffer size in bytes
-
-
方法详细资料
-
write
- 指定者:
write在类中OutputStream- 抛出:
IOException
-
write
- 覆盖:
write在类中OutputStream- 抛出:
IOException
-
close
public void close()- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 覆盖:
close在类中OutputStream
-
toString
-
size
public int size() -
toByteArrayUnsafe
public byte[] toByteArrayUnsafe() -
toByteArray
public byte[] toByteArray() -
reset
public void reset()Reset the contents of thisFastByteArrayOutputStream.All currently accumulated output in the output stream is discarded. The output stream can be used again.
-
getInputStream
-
writeTo
Write the buffers content to the given OutputStream.- 参数:
out- the OutputStream to write to- 抛出:
IOException
-
resize
public void resize(int targetCapacity)
-