📄 multipartstream.html
字号:
<BR> The index of last valid characer in the buffer + 1.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[])">MultipartStream</A></B>(java.io.InputStream input, byte[] boundary)</CODE><BR> Constructs a MultipartStream with a defalut size buffer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int)">MultipartStream</A></B>(java.io.InputStream input, byte[] boundary, int bufSize)</CODE><BR> Constructs a MultipartStream with a custom size buffer.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#arrayequals(byte[], byte[], int)">arrayequals</A></B>(byte[] a, byte[] b, int count)</CODE><BR> Compares <code>count</code> first bytes in the arrays <code>a</code> and <code>b</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#discardBodyData()">discardBodyData</A></B>()</CODE><BR> Reads <code>body-data</code> from the current <code>encapsulation</code> and discards it.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#findByte(byte, int)">findByte</A></B>(byte value, int pos)</CODE><BR> Searches a byte of specified value in the <code>buffer</code> starting at specified <code>position</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#findSeparator()">findSeparator</A></B>()</CODE><BR> Searches the <code>boundary</code> in <code>buffer</code> region delimited by <code>head</code> and <code>tail</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#readBodyData(java.io.OutputStream)">readBodyData</A></B>(java.io.OutputStream output)</CODE><BR> Reads <code>body-data</code> from the current <code>encapsulation</code> and writes its contents into the output <code>Stream</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#readBoundary()">readBoundary</A></B>()</CODE><BR> Skips a <code>boundary</code> token, and checks wether more <code>encapsulations</code> are contained in the stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#readByte()">readByte</A></B>()</CODE><BR> Reads a byte from the <code>buffer</code>, and refills it as neccessary.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#readHeaders()">readHeaders</A></B>()</CODE><BR> Reads <code>header-part</code> of the current <code>encapsulation</code> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#setBoundary(byte[])">setBoundary</A></B>(byte[] boundary)</CODE><BR> Changes the boundary token used for partitioning the stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/upload/MultipartStream.html#skipPreamble()">skipPreamble</A></B>()</CODE><BR> Finds the beginning of the first <code>encapsulation</code>.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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 =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="HEADER_PART_SIZE_MAX"><!-- --></A><H3>HEADER_PART_SIZE_MAX</H3><PRE>public static final int <B>HEADER_PART_SIZE_MAX</B></PRE><DL><DD>The maximum lenght of <code>header-part</code> that will be processed (10 kilobytes = 10240 bytes.)</DL><HR><A NAME="input"><!-- --></A><H3>input</H3><PRE>protected java.io.InputStream <B>input</B></PRE><DL><DD>The stream were data is read from.</DL><HR><A NAME="boundaryLength"><!-- --></A><H3>boundaryLength</H3><PRE>protected int <B>boundaryLength</B></PRE><DL><DD>The lenght of boundary token plus leading <code>CRLF--</code>.</DL><HR><A NAME="keepRegion"><!-- --></A><H3>keepRegion</H3><PRE>protected int <B>keepRegion</B></PRE><DL><DD>The amount of data that must be kept in the buffer in order to detect delimiters reliably.</DL><HR><A NAME="boundary"><!-- --></A><H3>boundary</H3><PRE>protected byte[] <B>boundary</B></PRE><DL><DD>A byte sequence that partitions the stream.</DL><HR><A NAME="bufSize"><!-- --></A><H3>bufSize</H3><PRE>protected int <B>bufSize</B></PRE><DL><DD>The lenght of the buffer used for processing.</DL><HR><A NAME="DEFAULT_BUFSIZE"><!-- --></A><H3>DEFAULT_BUFSIZE</H3><PRE>protected static final int <B>DEFAULT_BUFSIZE</B></PRE><DL><DD>The default lenght of the buffer used for processing.</DL><HR><A NAME="buffer"><!-- --></A><H3>buffer</H3><PRE>protected byte[] <B>buffer</B></PRE><DL><DD>The buffer used for processing.</DL><HR><A NAME="head"><!-- --></A><H3>head</H3><PRE>protected int <B>head</B></PRE><DL><DD>The index of first valid character in the buffer. 0 <= head < bufSize</DL><HR><A NAME="tail"><!-- --></A><H3>tail</H3><PRE>protected int <B>tail</B></PRE><DL><DD>The index of last valid characer in the buffer + 1. 0 <= tail <= bufSize</DL><HR><A NAME="HEADER_SEPARATOR"><!-- --></A><H3>HEADER_SEPARATOR</H3><PRE>protected static final byte[] <B>HEADER_SEPARATOR</B></PRE><DL><DD>A byte sequence that marks the end of <code>header-part</code> (<code>CRLFCRLF</code>).</DL><HR><A NAME="FIELD_SEPARATOR"><!-- --></A><H3>FIELD_SEPARATOR</H3><PRE>protected static final byte[] <B>FIELD_SEPARATOR</B></PRE><DL><DD>A byte sequence that that follows a delimiter that will be followed by an encapsulation (<code>CRLF</code>).</DL><HR><A NAME="STREAM_TERMINATOR"><!-- --></A><H3>STREAM_TERMINATOR</H3><PRE>protected static final byte[] <B>STREAM_TERMINATOR</B></PRE><DL><DD>A byte sequence that that follows a delimiter of the last encapsulation in the stream (<code>--</code>).</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -