|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.io.OutputStream
org.apache.commons.io.output.ThresholdingOutputStream
org.tinygroup.weblayer.webcontext.parser.fileupload.DeferredByteOutputStream
public class DeferredByteOutputStream
功能说明:对普通字段与表单字段延迟输出
系统版本: v1.0
开发人员: renhui
开发时间: 2014-1-2
功能描述: 写明作用,调用方式,使用场景,以及特殊情况
| 构造方法摘要 | |
|---|---|
DeferredByteOutputStream(int threshold)
Constructs an instance of this class which will trigger an event at the specified threshold, and save data to a file beyond that point. |
|
| 方法摘要 | |
|---|---|
void |
clearData()
|
void |
close()
Closes underlying output stream, and mark this as closed |
byte[] |
getFileData()
返回文件字节流 |
byte[] |
getMemoryData()
Returns the data for this output stream as an array of bytes, assuming that the data has been retained in memory. |
protected OutputStream |
getStream()
Returns the current output stream. |
boolean |
isInMemory()
Determines whether or not the data for this output stream has been retained in memory. |
protected void |
thresholdReached()
Switches the underlying output stream from a memory based stream to one that is backed by disk. |
void |
writeTo(OutputStream out)
Writes the data from this output stream to the specified output stream, after it has been closed. |
| 从类 org.apache.commons.io.output.ThresholdingOutputStream 继承的方法 |
|---|
checkThreshold, flush, getByteCount, getThreshold, isThresholdExceeded, resetByteCount, write, write, write |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public DeferredByteOutputStream(int threshold)
threshold - The number of bytes at which to trigger an event.outputFile - The file to which data is saved beyond the threshold.| 方法详细信息 |
|---|
protected OutputStream getStream()
throws IOException
org.apache.commons.io.output.ThresholdingOutputStream 中的 getStreamIOException - if an error occurs.
protected void thresholdReached()
throws IOException
org.apache.commons.io.output.ThresholdingOutputStream 中的 thresholdReachedIOException - if an error occurs.public boolean isInMemory()
true if the data is available in memory; false
otherwise.public byte[] getMemoryData()
null.
null if no such data
is available.public byte[] getFileData()
public void close()
throws IOException
Closeable 中的 closeorg.apache.commons.io.output.ThresholdingOutputStream 中的 closeIOException - if an error occurs.
public void writeTo(OutputStream out)
throws IOException
out - output stream to write to.
IOException - if this stream is not yet closed or an error occurs.public void clearData()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||