📄 deferredfileoutputstream.html
字号:
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="DeferredFileOutputStream(int, java.io.File)"><!-- --></A><H3>
DeferredFileOutputStream</H3>
<PRE>
public <B>DeferredFileOutputStream</B>(int threshold, java.io.File outputFile)</PRE>
<DL>
<DD>Constructs an instance of this class which will trigger an event at the specified threshold, and save data to a file beyond that point.
<P>
<DT><B>Parameters:</B><DD><CODE>threshold</CODE> - The number of bytes at which to trigger an event.<DD><CODE>outputFile</CODE> - The file to which data is saved beyond the threshold.</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getStream()"><!-- --></A><H3>
getStream</H3>
<PRE>
protected java.io.OutputStream <B>getStream</B>() throws java.io.IOException</PRE>
<DL>
<DD>Returns the current output stream. This may be memory based or disk based, depending on the current state with respect to the threshold.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/fileupload/ThresholdingOutputStream.html#getStream()">getStream</A></CODE> in class <CODE><A HREF="../../../../org/apache/commons/fileupload/ThresholdingOutputStream.html">ThresholdingOutputStream</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The underlying output stream.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="thresholdReached()"><!-- --></A><H3>
thresholdReached</H3>
<PRE>
protected void <B>thresholdReached</B>() throws java.io.IOException</PRE>
<DL>
<DD>Switches the underlying output stream from a memory based stream to one that is backed by disk. This is the point at which we realise that too much data is being written to keep in memory, so we elect to switch to disk-based storage.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/fileupload/ThresholdingOutputStream.html#thresholdReached()">thresholdReached</A></CODE> in class <CODE><A HREF="../../../../org/apache/commons/fileupload/ThresholdingOutputStream.html">ThresholdingOutputStream</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="isInMemory()"><!-- --></A><H3>
isInMemory</H3>
<PRE>
public boolean <B>isInMemory</B>()</PRE>
<DL>
<DD>Determines whether or not the data for this output stream has been retained in memory.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the data is available in memory; <code>false</code> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="getData()"><!-- --></A><H3>
getData</H3>
<PRE>
public byte[] <B>getData</B>()</PRE>
<DL>
<DD>Returns the data for this output stream as an array of bytes, assuming that the data has been retained in memory. If the data was written to disk, this method returns <code>null</code>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The data for this output stream, or <code>null</code> if no such data is available.</DL>
</DD>
</DL>
<HR>
<A NAME="getFile()"><!-- --></A><H3>
getFile</H3>
<PRE>
public java.io.File <B>getFile</B>()</PRE>
<DL>
<DD>Returns the data for this output stream as a <code>File</code>, assuming that the data was written to disk. If the data was retained in memory, this method returns <code>null</code>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The file for this output stream, or <code>null</code> if no such file exists.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DeferredFileOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/fileupload/DefaultFileItemFactory.html"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/commons/fileupload/DiskFileUpload.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="DeferredFileOutputStream.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -