📄 limitedinputstream.html
字号:
<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="LimitedInputStream(java.io.InputStream, long)"><!-- --></A><H3>LimitedInputStream</H3><PRE>public <B>LimitedInputStream</B>(java.io.InputStream pIn, long pSizeMax)</PRE><DL><DD>Creates a new instance.<P><DL><DT><B>Parameters:</B><DD><CODE>pIn</CODE> - The input stream, which shall be limited.<DD><CODE>pSizeMax</CODE> - The limit; no more than this number of bytes shall be returned by the source stream.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="raiseError(long, long)"><!-- --></A><H3>raiseError</H3><PRE>protected abstract void <B>raiseError</B>(long pSizeMax, long pCount) throws java.io.IOException</PRE><DL><DD>Called to indicate, that the input streams limit has been exceeded.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pSizeMax</CODE> - The input streams limit, in bytes.<DD><CODE>pCount</CODE> - The actual number of bytes.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - The called method is expected to raise an IOException.</DL></DD></DL><HR><A NAME="read()"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>() throws java.io.IOException</PRE><DL><DD>Reads the next byte of data from this input stream. The value byte is returned as an <code>int</code> in the range <code>0</code> to <code>255</code>. If no byte is available because the end of the stream has been reached, the value <code>-1</code> is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown. <p> This method simply performs <code>in.read()</code> and returns the result.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>read</CODE> in class <CODE>java.io.FilterInputStream</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the next byte of data, or <code>-1</code> if the end of the stream is reached.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterInputStream.in</CODE></DL></DD></DL><HR><A NAME="read(byte[], int, int)"><!-- --></A><H3>read</H3><PRE>public int <B>read</B>(byte[] b, int off, int len) throws java.io.IOException</PRE><DL><DD>Reads up to <code>len</code> bytes of data from this input stream into an array of bytes. If <code>len</code> is not zero, the method blocks until some input is available; otherwise, no bytes are read and <code>0</code> is returned. <p> This method simply performs <code>in.read(b, off, len)</code> and returns the result.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>read</CODE> in class <CODE>java.io.FilterInputStream</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.<DD><CODE>off</CODE> - The start offset in the destination array <code>b</code>.<DD><CODE>len</CODE> - the maximum number of bytes read.<DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or <code>-1</code> if there is no more data because the end of the stream has been reached.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - If <code>b</code> is <code>null</code>.<DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - If <code>off</code> is negative, <code>len</code> is negative, or <code>len</code> is greater than <code>b.length - off</code><DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterInputStream.in</CODE></DL></DD></DL><HR><A NAME="isClosed()"><!-- --></A><H3>isClosed</H3><PRE>public boolean <B>isClosed</B>() throws java.io.IOException</PRE><DL><DD>Returns, whether this stream is already closed.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>True, if the stream is closed, otherwise false.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - An I/O error occurred.</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 input stream and releases any system resources associated with the stream. This method simply performs <code>in.close()</code>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>close</CODE> in interface <CODE>java.io.Closeable</CODE><DT><B>Overrides:</B><DD><CODE>close</CODE> in class <CODE>java.io.FilterInputStream</CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterInputStream.in</CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <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/LimitedInputStream.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/util/Closeable.html" title="interface in org.apache.commons.fileupload.util"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/commons/fileupload/util/Streams.html" title="class in org.apache.commons.fileupload.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/commons/fileupload/util/LimitedInputStream.html" target="_top"><B>FRAMES</B></A> <A HREF="LimitedInputStream.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_java.io.FilterInputStream">FIELD</A> | <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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -