Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 67bb8c6664db9a9d95eeb2528fcf0c9d > files > 40

jakarta-commons-fileupload-javadoc-1.2.1-2.0.5mdv2011.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 03 09:46:58 UTC 2010 -->
<TITLE>
MultipartStream
</TITLE>

<META NAME="date" CONTENT="2010-12-03">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="MultipartStream";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" 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_top_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>&nbsp;</TD>
  <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/MultipartStream.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/FileUploadException.html" title="class in org.apache.commons.fileupload"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html" title="class in org.apache.commons.fileupload"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/apache/commons/fileupload/MultipartStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MultipartStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.fileupload</FONT>
<BR>
Class MultipartStream</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.fileupload.MultipartStream</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>MultipartStream</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
<p> Low level API for processing file uploads.

 <p> This class can be used to process data streams conforming to MIME
 'multipart' format as defined in
 <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Arbitrarily
 large amounts of data in the stream can be processed under constant
 memory usage.

 <p> The format of the stream is defined in the following way:<br>

 <code>
   multipart-body := preamble 1*encapsulation close-delimiter epilogue<br>
   encapsulation := delimiter body CRLF<br>
   delimiter := "--" boundary CRLF<br>
   close-delimiter := "--" boudary "--"<br>
   preamble := &lt;ignore&gt;<br>
   epilogue := &lt;ignore&gt;<br>
   body := header-part CRLF body-part<br>
   header-part := 1*header CRLF<br>
   header := header-name ":" header-value<br>
   header-name := &lt;printable ascii characters except ":"&gt;<br>
   header-value := &lt;any ascii characters except CR & LF&gt;<br>
   body-data := &lt;arbitrary data&gt;<br>
 </code>

 <p>Note that body-data can contain another mulipart entity.  There
 is limited support for single pass processing of such nested
 streams.  The nested stream is <strong>required</strong> to have a
 boundary token of the same length as the parent stream (see <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#setBoundary(byte[])"><CODE>setBoundary(byte[])</CODE></A>).

 <p>Here is an example of usage of this class.<br>

 <pre>
    try {
        MultipartStream multipartStream = new MultipartStream(input,
                                                              boundary);
        boolean nextPart = multipartStream.skipPreamble();
        OutputStream output;
        while(nextPart) {
            header = chunks.readHeader();
            // process headers
            // create some output stream
            multipartStream.readBodyPart(output);
            nextPart = multipartStream.readBoundary();
        }
    } catch(MultipartStream.MalformedStreamException e) {
          // the stream failed to follow required syntax
    } catch(IOException) {
          // a read or write error occurred
    }

 </pre>
<P>

<P>
<DL>
<DT><B>Version:</B></DT>
  <DD>$Id: MultipartStream.java 607869 2008-01-01 16:42:17Z jochen $</DD>
<DT><B>Author:</B></DT>
  <DD><a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>, <a href="mailto:martinc@apache.org">Martin Cooper</a>, Sean C. Sullivan</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html" title="class in org.apache.commons.fileupload">MultipartStream.IllegalBoundaryException</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thrown upon attempt of setting an invalid boundary token.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ItemInputStream.html" title="class in org.apache.commons.fileupload">MultipartStream.ItemInputStream</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An <CODE>InputStream</CODE> for reading an items contents.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thrown to indicate that the input stream fails to follow the
 required syntax.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal class, which is used to invoke the
 <A HREF="../../../../org/apache/commons/fileupload/ProgressListener.html" title="interface in org.apache.commons.fileupload"><CODE>ProgressListener</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#boundary">boundary</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The byte sequence that partitions the stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#BOUNDARY_PREFIX">BOUNDARY_PREFIX</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A byte sequence that precedes a boundary (<code>CRLF--</code>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#boundaryLength">boundaryLength</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The length of the boundary token plus the leading <code>CRLF--</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#buffer">buffer</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The buffer used for processing the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#bufSize">bufSize</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The length of the buffer used for processing the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#CR">CR</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Carriage Return ASCII character value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#DASH">DASH</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The dash (-) ASCII character value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#DEFAULT_BUFSIZE">DEFAULT_BUFSIZE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default length of the buffer used for processing a request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#FIELD_SEPARATOR">FIELD_SEPARATOR</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A byte sequence that that follows a delimiter that will be
 followed by an encapsulation (<code>CRLF</code>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#head">head</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The index of first valid character in the buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#HEADER_PART_SIZE_MAX">HEADER_PART_SIZE_MAX</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum length of <code>header-part</code> that will be
 processed (10 kilobytes = 10240 bytes.).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#HEADER_SEPARATOR">HEADER_SEPARATOR</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A byte sequence that marks the end of <code>header-part</code>
 (<code>CRLFCRLF</code>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#headerEncoding">headerEncoding</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The content encoding to use when reading headers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#input">input</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The input stream from which data is read.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#keepRegion">keepRegion</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The amount of data, in bytes, that must be kept in the buffer in order
 to detect delimiters reliably.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#LF">LF</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Line Feed ASCII character value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#notifier">notifier</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The progress notifier, if any, or null.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#STREAM_TERMINATOR">STREAM_TERMINATOR</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A byte sequence that that follows a delimiter of the last
 encapsulation in the stream (<code>--</code>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#tail">tail</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The index of last valid characer in the buffer + 1.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream()">MultipartStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[],
 org.apache.commons.fileupload.MultipartStream.ProgressNotifier)</CODE></A>,
 or <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[], int,
 org.apache.commons.fileupload.MultipartStream.ProgressNotifier)</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[])">MultipartStream</A></B>(java.io.InputStream&nbsp;input,
                byte[]&nbsp;boundary)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[],
  MultipartStream.ProgressNotifier)</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int)">MultipartStream</A></B>(java.io.InputStream&nbsp;input,
                byte[]&nbsp;boundary,
                int&nbsp;bufSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[], int,
  org.apache.commons.fileupload.MultipartStream.ProgressNotifier)</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)">MultipartStream</A></B>(java.io.InputStream&nbsp;input,
                byte[]&nbsp;boundary,
                int&nbsp;bufSize,
                <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A>&nbsp;pNotifier)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Constructs a <code>MultipartStream</code> with a custom size buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)">MultipartStream</A></B>(java.io.InputStream&nbsp;input,
                byte[]&nbsp;boundary,
                <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A>&nbsp;pNotifier)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Constructs a <code>MultipartStream</code> with a default size buffer.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#arrayequals(byte[], byte[], int)">arrayequals</A></B>(byte[]&nbsp;a,
            byte[]&nbsp;b,
            int&nbsp;count)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#discardBodyData()">discardBodyData</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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 &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#findByte(byte, int)">findByte</A></B>(byte&nbsp;value,
         int&nbsp;pos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Searches for a byte of specified value in the <code>buffer</code>,
 starting at the specified <code>position</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#findSeparator()">findSeparator</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Searches for the <code>boundary</code> in the <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>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#getHeaderEncoding()">getHeaderEncoding</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the character encoding used when reading the headers of an
 individual part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;<A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ItemInputStream.html" title="class in org.apache.commons.fileupload">MultipartStream.ItemInputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#newInputStream()">newInputStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ItemInputStream.html" title="class in org.apache.commons.fileupload"><CODE>MultipartStream.ItemInputStream</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#readBodyData(java.io.OutputStream)">readBodyData</A></B>(java.io.OutputStream&nbsp;output)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#readBoundary()">readBoundary</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skips a <code>boundary</code> token, and checks whether 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>&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#readByte()">readByte</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a byte from the <code>buffer</code>, and refills it as
 necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#readHeaders()">readHeaders</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads the <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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#setBoundary(byte[])">setBoundary</A></B>(byte[]&nbsp;boundary)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#setHeaderEncoding(java.lang.String)">setHeaderEncoding</A></B>(java.lang.String&nbsp;encoding)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the character encoding to be used when reading the headers of
 individual parts.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#skipPreamble()">skipPreamble</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the beginning of the first <code>encapsulation</code>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="CR"><!-- --></A><H3>
CR</H3>
<PRE>
public static final byte <B>CR</B></PRE>
<DL>
<DD>The Carriage Return ASCII character value.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.commons.fileupload.MultipartStream.CR">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="LF"><!-- --></A><H3>
LF</H3>
<PRE>
public static final byte <B>LF</B></PRE>
<DL>
<DD>The Line Feed ASCII character value.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.commons.fileupload.MultipartStream.LF">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="DASH"><!-- --></A><H3>
DASH</H3>
<PRE>
public static final byte <B>DASH</B></PRE>
<DL>
<DD>The dash (-) ASCII character value.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.commons.fileupload.MultipartStream.DASH">Constant Field Values</A></DL>
</DL>
<HR>

<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 length of <code>header-part</code> that will be
 processed (10 kilobytes = 10240 bytes.).
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.commons.fileupload.MultipartStream.HEADER_PART_SIZE_MAX">Constant Field Values</A></DL>
</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 length of the buffer used for processing a request.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.commons.fileupload.MultipartStream.DEFAULT_BUFSIZE">Constant Field Values</A></DL>
</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>).
<P>
<DL>
</DL>
</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>).
<P>
<DL>
</DL>
</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>).
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="BOUNDARY_PREFIX"><!-- --></A><H3>
BOUNDARY_PREFIX</H3>
<PRE>
protected static final byte[] <B>BOUNDARY_PREFIX</B></PRE>
<DL>
<DD>A byte sequence that precedes a boundary (<code>CRLF--</code>).
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="input"><!-- --></A><H3>
input</H3>
<PRE>
private final java.io.InputStream <B>input</B></PRE>
<DL>
<DD>The input stream from which data is read.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="boundaryLength"><!-- --></A><H3>
boundaryLength</H3>
<PRE>
private int <B>boundaryLength</B></PRE>
<DL>
<DD>The length of the boundary token plus the leading <code>CRLF--</code>.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="keepRegion"><!-- --></A><H3>
keepRegion</H3>
<PRE>
private int <B>keepRegion</B></PRE>
<DL>
<DD>The amount of data, in bytes, that must be kept in the buffer in order
 to detect delimiters reliably.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="boundary"><!-- --></A><H3>
boundary</H3>
<PRE>
private byte[] <B>boundary</B></PRE>
<DL>
<DD>The byte sequence that partitions the stream.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="bufSize"><!-- --></A><H3>
bufSize</H3>
<PRE>
private final int <B>bufSize</B></PRE>
<DL>
<DD>The length of the buffer used for processing the request.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="buffer"><!-- --></A><H3>
buffer</H3>
<PRE>
private final byte[] <B>buffer</B></PRE>
<DL>
<DD>The buffer used for processing the request.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="head"><!-- --></A><H3>
head</H3>
<PRE>
private int <B>head</B></PRE>
<DL>
<DD>The index of first valid character in the buffer.
 <br>
 0 <= head < bufSize
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="tail"><!-- --></A><H3>
tail</H3>
<PRE>
private int <B>tail</B></PRE>
<DL>
<DD>The index of last valid characer in the buffer + 1.
 <br>
 0 <= tail <= bufSize
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="headerEncoding"><!-- --></A><H3>
headerEncoding</H3>
<PRE>
private java.lang.String <B>headerEncoding</B></PRE>
<DL>
<DD>The content encoding to use when reading headers.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="notifier"><!-- --></A><H3>
notifier</H3>
<PRE>
private final <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A> <B>notifier</B></PRE>
<DL>
<DD>The progress notifier, if any, or null.
<P>
<DL>
</DL>
</DL>

<!-- ========= 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="MultipartStream()"><!-- --></A><H3>
MultipartStream</H3>
<PRE>
public <B>MultipartStream</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[],
 org.apache.commons.fileupload.MultipartStream.ProgressNotifier)</CODE></A>,
 or <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[], int,
 org.apache.commons.fileupload.MultipartStream.ProgressNotifier)</CODE></A></I>
<P>
<DD>Creates a new instance.
<P>
</DL>
<HR>

<A NAME="MultipartStream(java.io.InputStream, byte[], int)"><!-- --></A><H3>
MultipartStream</H3>
<PRE>
public <B>MultipartStream</B>(java.io.InputStream&nbsp;input,
                       byte[]&nbsp;boundary,
                       int&nbsp;bufSize)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[], int,
  org.apache.commons.fileupload.MultipartStream.ProgressNotifier)</CODE></A>.</I>
<P>
<DD><p> Constructs a <code>MultipartStream</code> with a custom size buffer
 and no progress notifier.

 <p> Note that the buffer must be at least big enough to contain the
 boundary string, plus 4 characters for CR/LF and double dash, plus at
 least one byte of data.  Too small a buffer size setting will degrade
 performance.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - The <code>InputStream</code> to serve as a data source.<DD><CODE>boundary</CODE> - The token used for dividing the stream into
                 <code>encapsulations</code>.<DD><CODE>bufSize</CODE> - The size of the buffer to be used, in bytes.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[],
   MultipartStream.ProgressNotifier)</CODE></A></DL>
</DL>
<HR>

<A NAME="MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><!-- --></A><H3>
MultipartStream</H3>
<PRE>
<B>MultipartStream</B>(java.io.InputStream&nbsp;input,
                byte[]&nbsp;boundary,
                int&nbsp;bufSize,
                <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A>&nbsp;pNotifier)</PRE>
<DL>
<DD><p> Constructs a <code>MultipartStream</code> with a custom size buffer.

 <p> Note that the buffer must be at least big enough to contain the
 boundary string, plus 4 characters for CR/LF and double dash, plus at
 least one byte of data.  Too small a buffer size setting will degrade
 performance.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - The <code>InputStream</code> to serve as a data source.<DD><CODE>boundary</CODE> - The token used for dividing the stream into
                 <code>encapsulations</code>.<DD><CODE>bufSize</CODE> - The size of the buffer to be used, in bytes.<DD><CODE>pNotifier</CODE> - The notifier, which is used for calling the
                  progress listener, if any.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[],
     MultipartStream.ProgressNotifier)</CODE></A></DL>
</DL>
<HR>

<A NAME="MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><!-- --></A><H3>
MultipartStream</H3>
<PRE>
<B>MultipartStream</B>(java.io.InputStream&nbsp;input,
                byte[]&nbsp;boundary,
                <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ProgressNotifier.html" title="class in org.apache.commons.fileupload">MultipartStream.ProgressNotifier</A>&nbsp;pNotifier)</PRE>
<DL>
<DD><p> Constructs a <code>MultipartStream</code> with a default size buffer.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - The <code>InputStream</code> to serve as a data source.<DD><CODE>boundary</CODE> - The token used for dividing the stream into
                 <code>encapsulations</code>.<DD><CODE>pNotifier</CODE> - An object for calling the progress listener, if any.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[], int,
     MultipartStream.ProgressNotifier)</CODE></A></DL>
</DL>
<HR>

<A NAME="MultipartStream(java.io.InputStream, byte[])"><!-- --></A><H3>
MultipartStream</H3>
<PRE>
public <B>MultipartStream</B>(java.io.InputStream&nbsp;input,
                       byte[]&nbsp;boundary)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[],
  MultipartStream.ProgressNotifier)</CODE></A>.</I>
<P>
<DD><p> Constructs a <code>MultipartStream</code> with a default size buffer.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - The <code>InputStream</code> to serve as a data source.<DD><CODE>boundary</CODE> - The token used for dividing the stream into
                 <code>encapsulations</code>.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>MultipartStream(InputStream, byte[], int,
  MultipartStream.ProgressNotifier)</CODE></A></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="getHeaderEncoding()"><!-- --></A><H3>
getHeaderEncoding</H3>
<PRE>
public java.lang.String <B>getHeaderEncoding</B>()</PRE>
<DL>
<DD>Retrieves the character encoding used when reading the headers of an
 individual part. When not specified, or <code>null</code>, the platform
 default encoding is used.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The encoding used to read part headers.</DL>
</DD>
</DL>
<HR>

<A NAME="setHeaderEncoding(java.lang.String)"><!-- --></A><H3>
setHeaderEncoding</H3>
<PRE>
public void <B>setHeaderEncoding</B>(java.lang.String&nbsp;encoding)</PRE>
<DL>
<DD>Specifies the character encoding to be used when reading the headers of
 individual parts. When not specified, or <code>null</code>, the platform
 default encoding is used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>encoding</CODE> - The encoding used to read part headers.</DL>
</DD>
</DL>
<HR>

<A NAME="readByte()"><!-- --></A><H3>
readByte</H3>
<PRE>
public byte <B>readByte</B>()
              throws java.io.IOException</PRE>
<DL>
<DD>Reads a byte from the <code>buffer</code>, and refills it as
 necessary.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The next byte from the input stream.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if there is no more data available.</DL>
</DD>
</DL>
<HR>

<A NAME="readBoundary()"><!-- --></A><H3>
readBoundary</H3>
<PRE>
public boolean <B>readBoundary</B>()
                     throws <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></PRE>
<DL>
<DD>Skips a <code>boundary</code> token, and checks whether more
 <code>encapsulations</code> are contained in the stream.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if there are more encapsulations in
         this stream; <code>false</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></CODE> - if the stream ends unexpecetedly or
                                  fails to follow required syntax.</DL>
</DD>
</DL>
<HR>

<A NAME="setBoundary(byte[])"><!-- --></A><H3>
setBoundary</H3>
<PRE>
public void <B>setBoundary</B>(byte[]&nbsp;boundary)
                 throws <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html" title="class in org.apache.commons.fileupload">MultipartStream.IllegalBoundaryException</A></PRE>
<DL>
<DD><p>Changes the boundary token used for partitioning the stream.

 <p>This method allows single pass processing of nested multipart
 streams.

 <p>The boundary token of the nested stream is <code>required</code>
 to be of the same length as the boundary token in parent stream.

 <p>Restoring the parent stream boundary token after processing of a
 nested stream is left to the application.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>boundary</CODE> - The boundary to be used for parsing of the nested
                 stream.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html" title="class in org.apache.commons.fileupload">MultipartStream.IllegalBoundaryException</A></CODE> - if the <code>boundary</code>
                                  has a different length than the one
                                  being currently parsed.</DL>
</DD>
</DL>
<HR>

<A NAME="readHeaders()"><!-- --></A><H3>
readHeaders</H3>
<PRE>
public java.lang.String <B>readHeaders</B>()
                             throws <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></PRE>
<DL>
<DD><p>Reads the <code>header-part</code> of the current
 <code>encapsulation</code>.

 <p>Headers are returned verbatim to the input stream, including the
 trailing <code>CRLF</code> marker. Parsing is left to the
 application.

 <p><strong>TODO</strong> allow limiting maximum header size to
 protect against abuse.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The <code>header-part</code> of the current encapsulation.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></CODE> - if the stream ends unexpecetedly.</DL>
</DD>
</DL>
<HR>

<A NAME="readBodyData(java.io.OutputStream)"><!-- --></A><H3>
readBodyData</H3>
<PRE>
public int <B>readBodyData</B>(java.io.OutputStream&nbsp;output)
                 throws <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A>,
                        java.io.IOException</PRE>
<DL>
<DD><p>Reads <code>body-data</code> from the current
 <code>encapsulation</code> and writes its contents into the
 output <code>Stream</code>.

 <p>Arbitrary large amounts of data can be processed by this
 method using a constant size buffer. (see <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#MultipartStream(java.io.InputStream, byte[], int, org.apache.commons.fileupload.MultipartStream.ProgressNotifier)"><CODE>constructor</CODE></A>).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>output</CODE> - The <code>Stream</code> to write data into. May
               be null, in which case this method is equivalent
               to <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.html#discardBodyData()"><CODE>discardBodyData()</CODE></A>.
<DT><B>Returns:</B><DD>the amount of data written.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></CODE> - if the stream ends unexpectedly.
<DD><CODE>java.io.IOException</CODE> - if an i/o error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="newInputStream()"><!-- --></A><H3>
newInputStream</H3>
<PRE>
<A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ItemInputStream.html" title="class in org.apache.commons.fileupload">MultipartStream.ItemInputStream</A> <B>newInputStream</B>()</PRE>
<DL>
<DD>Creates a new <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ItemInputStream.html" title="class in org.apache.commons.fileupload"><CODE>MultipartStream.ItemInputStream</CODE></A>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>A new instance of <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.ItemInputStream.html" title="class in org.apache.commons.fileupload"><CODE>MultipartStream.ItemInputStream</CODE></A>.</DL>
</DD>
</DL>
<HR>

<A NAME="discardBodyData()"><!-- --></A><H3>
discardBodyData</H3>
<PRE>
public int <B>discardBodyData</B>()
                    throws <A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A>,
                           java.io.IOException</PRE>
<DL>
<DD><p> Reads <code>body-data</code> from the current
 <code>encapsulation</code> and discards it.

 <p>Use this method to skip encapsulations you don't need or don't
 understand.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The amount of data discarded.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/commons/fileupload/MultipartStream.MalformedStreamException.html" title="class in org.apache.commons.fileupload">MultipartStream.MalformedStreamException</A></CODE> - if the stream ends unexpectedly.
<DD><CODE>java.io.IOException</CODE> - if an i/o error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="skipPreamble()"><!-- --></A><H3>
skipPreamble</H3>
<PRE>
public boolean <B>skipPreamble</B>()
                     throws java.io.IOException</PRE>
<DL>
<DD>Finds the beginning of the first <code>encapsulation</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if an <code>encapsulation</code> was found in
         the stream.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an i/o error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="arrayequals(byte[], byte[], int)"><!-- --></A><H3>
arrayequals</H3>
<PRE>
public static boolean <B>arrayequals</B>(byte[]&nbsp;a,
                                  byte[]&nbsp;b,
                                  int&nbsp;count)</PRE>
<DL>
<DD>Compares <code>count</code> first bytes in the arrays
 <code>a</code> and <code>b</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - The first array to compare.<DD><CODE>b</CODE> - The second array to compare.<DD><CODE>count</CODE> - How many bytes should be compared.
<DT><B>Returns:</B><DD><code>true</code> if <code>count</code> first bytes in arrays
         <code>a</code> and <code>b</code> are equal.</DL>
</DD>
</DL>
<HR>

<A NAME="findByte(byte, int)"><!-- --></A><H3>
findByte</H3>
<PRE>
protected int <B>findByte</B>(byte&nbsp;value,
                       int&nbsp;pos)</PRE>
<DL>
<DD>Searches for a byte of specified value in the <code>buffer</code>,
 starting at the specified <code>position</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The value to find.<DD><CODE>pos</CODE> - The starting position for searching.
<DT><B>Returns:</B><DD>The position of byte found, counting from beginning of the
         <code>buffer</code>, or <code>-1</code> if not found.</DL>
</DD>
</DL>
<HR>

<A NAME="findSeparator()"><!-- --></A><H3>
findSeparator</H3>
<PRE>
protected int <B>findSeparator</B>()</PRE>
<DL>
<DD>Searches for the <code>boundary</code> in the <code>buffer</code>
 region delimited by <code>head</code> and <code>tail</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The position of the boundary found, counting from the
         beginning of the <code>buffer</code>, or <code>-1</code> if
         not found.</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>&nbsp;</TD>
  <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/MultipartStream.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/FileUploadException.html" title="class in org.apache.commons.fileupload"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/commons/fileupload/MultipartStream.IllegalBoundaryException.html" title="class in org.apache.commons.fileupload"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/apache/commons/fileupload/MultipartStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MultipartStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>