⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thresholdingoutputstream.html

📁 sss sss sss sss sss sss sz
💻 HTML
📖 第 1 页 / 共 2 页
字号:
public <B>ThresholdingOutputStream</B>(int&nbsp;threshold)</PRE>
<DL>
<DD>Constructs an instance of this class which will trigger an event at the specified threshold.
<P>
<DT><B>Parameters:</B><DD><CODE>threshold</CODE> - The number of bytes at which to trigger an event.</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="write(int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(int&nbsp;b)           throws java.io.IOException</PRE>
<DL>
<DD>Writes the specified byte to this output stream.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - The byte to be written.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[]&nbsp;b)           throws java.io.IOException</PRE>
<DL>
<DD>Writes <code>b.length</code> bytes from the specified byte array to this output stream.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - The array of bytes to be written.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="write(byte[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[]&nbsp;b,                  int&nbsp;off,                  int&nbsp;len)           throws java.io.IOException</PRE>
<DL>
<DD>Writes <code>len</code> bytes from the specified byte array starting at offset <code>off</code> to this output stream.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - The byte array from which the data will be written.<DD><CODE>off</CODE> - The start offset in the byte array.<DD><CODE>len</CODE> - The number of bytes to write.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="flush()"><!-- --></A><H3>
flush</H3>
<PRE>
public void <B>flush</B>()           throws java.io.IOException</PRE>
<DL>
<DD>Flushes this output stream and forces any buffered output bytes to be written out.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>flush</CODE> in class <CODE>java.io.OutputStream</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="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()           throws java.io.IOException</PRE>
<DL>
<DD>Closes this output stream and releases any system resources associated with this stream.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>close</CODE> in class <CODE>java.io.OutputStream</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="getThreshold()"><!-- --></A><H3>
getThreshold</H3>
<PRE>
public int <B>getThreshold</B>()</PRE>
<DL>
<DD>Returns the threshold, in bytes, at which an event will be triggered.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The threshold point, in bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="getByteCount()"><!-- --></A><H3>
getByteCount</H3>
<PRE>
public long <B>getByteCount</B>()</PRE>
<DL>
<DD>Returns the number of bytes that have been written to this output stream.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The number of bytes written.</DL>
</DD>
</DL>
<HR>

<A NAME="isThresholdExceeded()"><!-- --></A><H3>
isThresholdExceeded</H3>
<PRE>
public boolean <B>isThresholdExceeded</B>()</PRE>
<DL>
<DD>Determines whether or not the configured threshold has been exceeded for this output stream.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the threshold has been reached;         <code>false</code> otherwise.</DL>
</DD>
</DL>
<HR>

<A NAME="checkThreshold(int)"><!-- --></A><H3>
checkThreshold</H3>
<PRE>
protected void <B>checkThreshold</B>(int&nbsp;count)                       throws java.io.IOException</PRE>
<DL>
<DD>Checks to see if writing the specified number of bytes would cause the configured threshold to be exceeded. If so, triggers an event to allow a concrete implementation to take action on this.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>count</CODE> - The number of bytes about to be written to the underlying              output stream.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="getStream()"><!-- --></A><H3>
getStream</H3>
<PRE>
protected abstract java.io.OutputStream <B>getStream</B>()                                           throws java.io.IOException</PRE>
<DL>
<DD>Returns the underlying output stream, to which the corresponding <code>OutputStream</code> methods in this class will ultimately delegate.
<P>
<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 abstract void <B>thresholdReached</B>()                                  throws java.io.IOException</PRE>
<DL>
<DD>Indicates that the configured threshold has been reached, and that a subclass should take whatever action necessary on this event. This may include changing the underlying output stream.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs.</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>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ThresholdingOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ThresholdingOutputStream.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright &copy; 2002-2003 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -