org.apache.struts2.util
类 FastByteArrayOutputStream

java.lang.Object
  继承者 java.io.OutputStream
      继承者 org.apache.struts2.util.FastByteArrayOutputStream
所有已实现的接口:
Closeable, Flushable

public class FastByteArrayOutputStream
extends OutputStream

A speedy implementation of ByteArrayOutputStream. It's not synchronized, and it does not copy buffers when it's expanded. There's also no copying of the internal buffer if it's contents is extracted with the writeTo(stream) method.


构造方法摘要
FastByteArrayOutputStream()
           
FastByteArrayOutputStream(int blockSize)
           
 
方法摘要
 void close()
           
 int getSize()
           
 byte[] toByteArray()
           
 String toString()
           
 void write(byte[] data, int offset, int length)
           
 void write(int datum)
           
 void writeTo(javax.servlet.jsp.JspWriter out, String encoding)
          This is a patched method (standard)
 void writeTo(OutputStream out)
           
 void writeTo(RandomAccessFile out)
           
 void writeTo(Writer out, String encoding)
          This is a patched method (added for common Writer, needed for tests)
 
从类 java.io.OutputStream 继承的方法
flush, write
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

FastByteArrayOutputStream

public FastByteArrayOutputStream()

FastByteArrayOutputStream

public FastByteArrayOutputStream(int blockSize)
方法详细信息

writeTo

public void writeTo(OutputStream out)
             throws IOException
抛出:
IOException

writeTo

public void writeTo(RandomAccessFile out)
             throws IOException
抛出:
IOException

writeTo

public void writeTo(Writer out,
                    String encoding)
             throws IOException
This is a patched method (added for common Writer, needed for tests)

参数:
out - Writer
encoding - Encoding
抛出:
IOException - If some output failed

writeTo

public void writeTo(javax.servlet.jsp.JspWriter out,
                    String encoding)
             throws IOException
This is a patched method (standard)

参数:
out - Writer
encoding - Encoding
抛出:
IOException - If some output failed

getSize

public int getSize()

toByteArray

public byte[] toByteArray()

toString

public String toString()
覆盖:
Object 中的 toString

write

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

write

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

close

public void close()
指定者:
接口 Closeable 中的 close
覆盖:
OutputStream 中的 close