类 FastByteArrayOutputStream

java.lang.Object
java.io.OutputStream
com.alibaba.ageiport.common.io.FastByteArrayOutputStream
所有已实现的接口:
Closeable, Flushable, AutoCloseable

public class FastByteArrayOutputStream extends OutputStream
  • 构造器详细资料

    • FastByteArrayOutputStream

      public FastByteArrayOutputStream()
      Create a new FastByteArrayOutputStream with the default initial capacity of 256 bytes.
    • FastByteArrayOutputStream

      public FastByteArrayOutputStream(int initialBlockSize)
      Create a new FastByteArrayOutputStream with the specified initial capacity.
      参数:
      initialBlockSize - the initial buffer size in bytes
  • 方法详细资料

    • write

      public void write(int datum) throws IOException
      指定者:
      write 在类中 OutputStream
      抛出:
      IOException
    • write

      public void write(byte[] data, int offset, int length) throws IOException
      覆盖:
      write 在类中 OutputStream
      抛出:
      IOException
    • close

      public void close()
      指定者:
      close 在接口中 AutoCloseable
      指定者:
      close 在接口中 Closeable
      覆盖:
      close 在类中 OutputStream
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • size

      public int size()
    • toByteArrayUnsafe

      public byte[] toByteArrayUnsafe()
    • toByteArray

      public byte[] toByteArray()
    • reset

      public void reset()
      Reset the contents of this FastByteArrayOutputStream.

      All currently accumulated output in the output stream is discarded. The output stream can be used again.

    • getInputStream

      public InputStream getInputStream()
    • writeTo

      public void writeTo(OutputStream out) throws IOException
      Write the buffers content to the given OutputStream.
      参数:
      out - the OutputStream to write to
      抛出:
      IOException
    • resize

      public void resize(int targetCapacity)