| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc on Fri Aug 22 03:43:59 EDT 2003 --> |
| <TITLE> |
| MultipartIterator (Apache Struts API Documentation) |
| </TITLE> |
| <META NAME="keywords" CONTENT="org.apache.struts.upload.MultipartIterator,MultipartIterator class"> |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| </HEAD> |
| <SCRIPT> |
| function asd() |
| { |
| parent.document.title="MultipartIterator (Apache Struts API Documentation)"; |
| } |
| </SCRIPT> |
| <BODY BGCOLOR="white" onload="asd();"> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <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/MultipartIterator.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/struts/upload/MultipartElement.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/struts/upload/MultipartRequestWrapper.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="MultipartIterator.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 | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.struts.upload</FONT> |
| <BR> |
| Class MultipartIterator</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.struts.upload.MultipartIterator</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT>public class <B>MultipartIterator</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| The MultipartIterator class is responsible for reading the |
| input data of a multipart request and splitting it up into |
| input elements, wrapped inside of a |
| <A HREF="../../../../org/apache/struts/upload/MultipartElement.html"><CODE>MultipartElement</CODE></A> |
| for easy definition. To use this class, create a new instance |
| of MultipartIterator passing it a HttpServletRequest in the |
| constructor. Then use the <A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#getNextElement()"><CODE>getNextElement</CODE></A> |
| method until it returns null, then you're finished. Example: <br> |
| <pre> |
| MultipartIterator iterator = new MultipartIterator(request); |
| MultipartElement element; |
| |
| while ((element = iterator.getNextElement()) != null) { |
| //do something with element |
| } |
| </pre> |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Author:</B></DT> |
| <DD>Mike Schachter</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/apache/struts/upload/MultipartElement.html"><CODE>MultipartElement</CODE></A></DL> |
| <HR> |
| |
| <P> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#boundary">boundary</A></B></CODE> |
| |
| <BR> |
| The boundary for this multipart request</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/struts/upload/MultipartIterator.html#bufferSize">bufferSize</A></B></CODE> |
| |
| <BR> |
| The amount of data read from a request at a time.</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/struts/upload/MultipartIterator.html#contentLength">contentLength</A></B></CODE> |
| |
| <BR> |
| The content length of this request</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#contentType">contentType</A></B></CODE> |
| |
| <BR> |
| The content-type.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#DEFAULT_ENCODING">DEFAULT_ENCODING</A></B></CODE> |
| |
| <BR> |
| The default encoding of a text element if none is specified.</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/struts/upload/MultipartIterator.html#diskBufferSize">diskBufferSize</A></B></CODE> |
| |
| <BR> |
| The size in bytes written to the filesystem at a time [20K]</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#FILE_PREFIX">FILE_PREFIX</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#HEADER_CONTENT_DISPOSITION">HEADER_CONTENT_DISPOSITION</A></B></CODE> |
| |
| <BR> |
| The name of the Content-Disposition header.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#HEADER_CONTENT_TYPE">HEADER_CONTENT_TYPE</A></B></CODE> |
| |
| <BR> |
| The name of the Content-Type header.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/apache/struts/upload/MultipartBoundaryInputStream.html">MultipartBoundaryInputStream</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#inputStream">inputStream</A></B></CODE> |
| |
| <BR> |
| The InputStream to use to read the multipart data.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#maxLengthExceeded">maxLengthExceeded</A></B></CODE> |
| |
| <BR> |
| Whether the maximum length has been exceeded.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#maxSize">maxSize</A></B></CODE> |
| |
| <BR> |
| The maximum file size in bytes allowed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#MESSAGE_CANNOT_RETRIEVE_BOUNDARY">MESSAGE_CANNOT_RETRIEVE_BOUNDARY</A></B></CODE> |
| |
| <BR> |
| The exception message for when the boundary of a multipart request can't be determined.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#PARAMETER_BOUNDARY">PARAMETER_BOUNDARY</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected javax.servlet.http.HttpServletRequest</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#request">request</A></B></CODE> |
| |
| <BR> |
| The request instance for this class</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#tempDir">tempDir</A></B></CODE> |
| |
| <BR> |
| The temporary directory to store files</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#TEXT_BUFFER_SIZE">TEXT_BUFFER_SIZE</A></B></CODE> |
| |
| <BR> |
| The size in bytes to copy of text data at a time.</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/struts/upload/MultipartIterator.html#MultipartIterator(javax.servlet.http.HttpServletRequest)">MultipartIterator</A></B>(javax.servlet.http.HttpServletRequest request)</CODE> |
| |
| <BR> |
| Constructs a MultipartIterator with a default buffer size and no file size |
| limit</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#MultipartIterator(javax.servlet.http.HttpServletRequest, int)">MultipartIterator</A></B>(javax.servlet.http.HttpServletRequest request, |
| int bufferSize)</CODE> |
| |
| <BR> |
| Constructs a MultipartIterator with the specified buffer size and |
| no file size limit</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#MultipartIterator(javax.servlet.http.HttpServletRequest, int, long)">MultipartIterator</A></B>(javax.servlet.http.HttpServletRequest request, |
| int bufferSize, |
| long maxSize)</CODE> |
| |
| <BR> |
| Constructs a MultipartIterator with the specified buffer size and |
| the specified file size limit in bytes</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#MultipartIterator(javax.servlet.http.HttpServletRequest, int, long, java.lang.String)">MultipartIterator</A></B>(javax.servlet.http.HttpServletRequest request, |
| int bufferSize, |
| long maxSize, |
| java.lang.String tempDir)</CODE> |
| |
| <BR> |
| </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>protected <A HREF="../../../../org/apache/struts/upload/MultipartElement.html">MultipartElement</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#createFileMultipartElement()">createFileMultipartElement</A></B>()</CODE> |
| |
| <BR> |
| Create a multipart element instance representing the file in the stream.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.io.File</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#createLocalFile()">createLocalFile</A></B>()</CODE> |
| |
| <BR> |
| Creates a file on disk from the current mulitpart element.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/apache/struts/upload/MultipartElement.html">MultipartElement</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#createTextMultipartElement(java.lang.String)">createTextMultipartElement</A></B>(java.lang.String encoding)</CODE> |
| |
| <BR> |
| Create a text element from the data in the body of the element.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#getBoundaryFromContentType()">getBoundaryFromContentType</A></B>()</CODE> |
| |
| <BR> |
| Parses a content-type String for the boundary.</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/struts/upload/MultipartIterator.html#getBufferSize()">getBufferSize</A></B>()</CODE> |
| |
| <BR> |
| Get the maximum amount of bytes read from a line at one time</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#getContentTypeOfRequest()">getContentTypeOfRequest</A></B>()</CODE> |
| |
| <BR> |
| Gets the value of the Content-Type header of the request.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#getElementEncoding()">getElementEncoding</A></B>()</CODE> |
| |
| <BR> |
| Get the character encoding used for this current multipart element.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#getMaxSize()">getMaxSize</A></B>()</CODE> |
| |
| <BR> |
| Get the maximum post data size allowed for a multipart request</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/struts/upload/MultipartElement.html">MultipartElement</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#getNextElement()">getNextElement</A></B>()</CODE> |
| |
| <BR> |
| Retrieves the next element in the iterator if one exists.</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/struts/upload/MultipartIterator.html#isMaxLengthExceeded()">isMaxLengthExceeded</A></B>()</CODE> |
| |
| <BR> |
| Whether or not the maximum length has been exceeded by the client.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/upload/MultipartIterator.html#parseRequest()">parseRequest</A></B>()</CODE> |
| |
| <BR> |
| Handles retrieving the boundary and setting the input stream</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/struts/upload/MultipartIterator.html#setBufferSize(int)">setBufferSize</A></B>(int bufferSize)</CODE> |
| |
| <BR> |
| Set the maximum amount of bytes read from a line at one time</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/struts/upload/MultipartIterator.html#setMaxSize(long)">setMaxSize</A></B>(long maxSize)</CODE> |
| |
| <BR> |
| Set the maximum post data size allowed for a multipart request</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="DEFAULT_ENCODING"><!-- --></A><H3> |
| DEFAULT_ENCODING</H3> |
| <PRE> |
| private static final java.lang.String <B>DEFAULT_ENCODING</B></PRE> |
| <DL> |
| <DD>The default encoding of a text element if none is specified. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.struts.upload.MultipartIterator.DEFAULT_ENCODING">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="TEXT_BUFFER_SIZE"><!-- --></A><H3> |
| TEXT_BUFFER_SIZE</H3> |
| <PRE> |
| private static final int <B>TEXT_BUFFER_SIZE</B></PRE> |
| <DL> |
| <DD>The size in bytes to copy of text data at a time. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.struts.upload.MultipartIterator.TEXT_BUFFER_SIZE">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="HEADER_CONTENT_TYPE"><!-- --></A><H3> |
| HEADER_CONTENT_TYPE</H3> |
| <PRE> |
| public static java.lang.String <B>HEADER_CONTENT_TYPE</B></PRE> |
| <DL> |
| <DD>The name of the Content-Type header. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="HEADER_CONTENT_DISPOSITION"><!-- --></A><H3> |
| HEADER_CONTENT_DISPOSITION</H3> |
| <PRE> |
| public static final java.lang.String <B>HEADER_CONTENT_DISPOSITION</B></PRE> |
| <DL> |
| <DD>The name of the Content-Disposition header. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.struts.upload.MultipartIterator.HEADER_CONTENT_DISPOSITION">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="MESSAGE_CANNOT_RETRIEVE_BOUNDARY"><!-- --></A><H3> |
| MESSAGE_CANNOT_RETRIEVE_BOUNDARY</H3> |
| <PRE> |
| public static final java.lang.String <B>MESSAGE_CANNOT_RETRIEVE_BOUNDARY</B></PRE> |
| <DL> |
| <DD>The exception message for when the boundary of a multipart request can't be determined. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.struts.upload.MultipartIterator.MESSAGE_CANNOT_RETRIEVE_BOUNDARY">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="PARAMETER_BOUNDARY"><!-- --></A><H3> |
| PARAMETER_BOUNDARY</H3> |
| <PRE> |
| private static final java.lang.String <B>PARAMETER_BOUNDARY</B></PRE> |
| <DL> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.struts.upload.MultipartIterator.PARAMETER_BOUNDARY">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="FILE_PREFIX"><!-- --></A><H3> |
| FILE_PREFIX</H3> |
| <PRE> |
| private static final java.lang.String <B>FILE_PREFIX</B></PRE> |
| <DL> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.struts.upload.MultipartIterator.FILE_PREFIX">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="request"><!-- --></A><H3> |
| request</H3> |
| <PRE> |
| protected javax.servlet.http.HttpServletRequest <B>request</B></PRE> |
| <DL> |
| <DD>The request instance for this class |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="inputStream"><!-- --></A><H3> |
| inputStream</H3> |
| <PRE> |
| protected <A HREF="../../../../org/apache/struts/upload/MultipartBoundaryInputStream.html">MultipartBoundaryInputStream</A> <B>inputStream</B></PRE> |
| <DL> |
| <DD>The InputStream to use to read the multipart data. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="boundary"><!-- --></A><H3> |
| boundary</H3> |
| <PRE> |
| protected java.lang.String <B>boundary</B></PRE> |
| <DL> |
| <DD>The boundary for this multipart request |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="maxSize"><!-- --></A><H3> |
| maxSize</H3> |
| <PRE> |
| protected long <B>maxSize</B></PRE> |
| <DL> |
| <DD>The maximum file size in bytes allowed. Ignored if -1 |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="contentLength"><!-- --></A><H3> |
| contentLength</H3> |
| <PRE> |
| protected int <B>contentLength</B></PRE> |
| <DL> |
| <DD>The content length of this request |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="diskBufferSize"><!-- --></A><H3> |
| diskBufferSize</H3> |
| <PRE> |
| protected int <B>diskBufferSize</B></PRE> |
| <DL> |
| <DD>The size in bytes written to the filesystem at a time [20K] |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="bufferSize"><!-- --></A><H3> |
| bufferSize</H3> |
| <PRE> |
| protected int <B>bufferSize</B></PRE> |
| <DL> |
| <DD>The amount of data read from a request at a time. |
| This also represents the maximum size in bytes of |
| a line read from the request [4KB] |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="tempDir"><!-- --></A><H3> |
| tempDir</H3> |
| <PRE> |
| protected java.lang.String <B>tempDir</B></PRE> |
| <DL> |
| <DD>The temporary directory to store files |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="contentType"><!-- --></A><H3> |
| contentType</H3> |
| <PRE> |
| protected java.lang.String <B>contentType</B></PRE> |
| <DL> |
| <DD>The content-type. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="maxLengthExceeded"><!-- --></A><H3> |
| maxLengthExceeded</H3> |
| <PRE> |
| protected boolean <B>maxLengthExceeded</B></PRE> |
| <DL> |
| <DD>Whether the maximum length has been exceeded. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| |
| <!-- ========= 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="MultipartIterator(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3> |
| MultipartIterator</H3> |
| <PRE> |
| public <B>MultipartIterator</B>(javax.servlet.http.HttpServletRequest request) |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Constructs a MultipartIterator with a default buffer size and no file size |
| limit |
| <P> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - The multipart request to iterate</DL> |
| <HR> |
| |
| <A NAME="MultipartIterator(javax.servlet.http.HttpServletRequest, int)"><!-- --></A><H3> |
| MultipartIterator</H3> |
| <PRE> |
| public <B>MultipartIterator</B>(javax.servlet.http.HttpServletRequest request, |
| int bufferSize) |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Constructs a MultipartIterator with the specified buffer size and |
| no file size limit |
| <P> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - The multipart request to iterate<DD><CODE>bufferSize</CODE> - The size in bytes that should be read from the input |
| stream at a times</DL> |
| <HR> |
| |
| <A NAME="MultipartIterator(javax.servlet.http.HttpServletRequest, int, long)"><!-- --></A><H3> |
| MultipartIterator</H3> |
| <PRE> |
| public <B>MultipartIterator</B>(javax.servlet.http.HttpServletRequest request, |
| int bufferSize, |
| long maxSize) |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Constructs a MultipartIterator with the specified buffer size and |
| the specified file size limit in bytes |
| <P> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - The multipart request to iterate<DD><CODE>bufferSize</CODE> - The size in bytes that should be read from the input |
| stream at a times<DD><CODE>maxSize</CODE> - The maximum size in bytes allowed for a multipart element's data</DL> |
| <HR> |
| |
| <A NAME="MultipartIterator(javax.servlet.http.HttpServletRequest, int, long, java.lang.String)"><!-- --></A><H3> |
| MultipartIterator</H3> |
| <PRE> |
| public <B>MultipartIterator</B>(javax.servlet.http.HttpServletRequest request, |
| int bufferSize, |
| long maxSize, |
| java.lang.String tempDir) |
| throws java.io.IOException</PRE> |
| <DL> |
| </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="parseRequest()"><!-- --></A><H3> |
| parseRequest</H3> |
| <PRE> |
| protected void <B>parseRequest</B>() |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Handles retrieving the boundary and setting the input stream |
| <P> |
| <DD><DL> |
| |
| <DD><CODE>java.io.IOException</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getNextElement()"><!-- --></A><H3> |
| getNextElement</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/struts/upload/MultipartElement.html">MultipartElement</A> <B>getNextElement</B>() |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Retrieves the next element in the iterator if one exists. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>a <A HREF="../../../../org/apache/struts/upload/MultipartElement.html"><CODE>MultipartElement</CODE></A> |
| representing the next element in the request data |
| <DT><B>Throws:</B> |
| <DD><CODE>java.io.IOException</CODE> - if the post size exceeds the maximum file size |
| passed in the 3 argument constructor or if the "ISO-8859-1" encoding isn't found</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getElementEncoding()"><!-- --></A><H3> |
| getElementEncoding</H3> |
| <PRE> |
| protected java.lang.String <B>getElementEncoding</B>()</PRE> |
| <DL> |
| <DD>Get the character encoding used for this current multipart element. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createTextMultipartElement(java.lang.String)"><!-- --></A><H3> |
| createTextMultipartElement</H3> |
| <PRE> |
| protected <A HREF="../../../../org/apache/struts/upload/MultipartElement.html">MultipartElement</A> <B>createTextMultipartElement</B>(java.lang.String encoding) |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Create a text element from the data in the body of the element. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>encoding</CODE> - The character encoding of the string. |
| <DD><CODE>java.io.IOException</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createFileMultipartElement()"><!-- --></A><H3> |
| createFileMultipartElement</H3> |
| <PRE> |
| protected <A HREF="../../../../org/apache/struts/upload/MultipartElement.html">MultipartElement</A> <B>createFileMultipartElement</B>() |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Create a multipart element instance representing the file in the stream. |
| <P> |
| <DD><DL> |
| |
| <DD><CODE>java.io.IOException</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setBufferSize(int)"><!-- --></A><H3> |
| setBufferSize</H3> |
| <PRE> |
| public void <B>setBufferSize</B>(int bufferSize)</PRE> |
| <DL> |
| <DD>Set the maximum amount of bytes read from a line at one time |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><CODE>ServletInputStream.readLine(byte[], int, int)</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBufferSize()"><!-- --></A><H3> |
| getBufferSize</H3> |
| <PRE> |
| public int <B>getBufferSize</B>()</PRE> |
| <DL> |
| <DD>Get the maximum amount of bytes read from a line at one time |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><CODE>ServletInputStream.readLine(byte[], int, int)</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setMaxSize(long)"><!-- --></A><H3> |
| setMaxSize</H3> |
| <PRE> |
| public void <B>setMaxSize</B>(long maxSize)</PRE> |
| <DL> |
| <DD>Set the maximum post data size allowed for a multipart request |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>maxSize</CODE> - The maximum post data size in bytes, set to <code>-1</code> |
| for no limit</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getMaxSize()"><!-- --></A><H3> |
| getMaxSize</H3> |
| <PRE> |
| public long <B>getMaxSize</B>()</PRE> |
| <DL> |
| <DD>Get the maximum post data size allowed for a multipart request |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The maximum post data size in bytes</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isMaxLengthExceeded()"><!-- --></A><H3> |
| isMaxLengthExceeded</H3> |
| <PRE> |
| public boolean <B>isMaxLengthExceeded</B>()</PRE> |
| <DL> |
| <DD>Whether or not the maximum length has been exceeded by the client. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBoundaryFromContentType()"><!-- --></A><H3> |
| getBoundaryFromContentType</H3> |
| <PRE> |
| private final void <B>getBoundaryFromContentType</B>() |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Parses a content-type String for the boundary. |
| <P> |
| <DD><DL> |
| |
| <DD><CODE>java.io.IOException</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getContentTypeOfRequest()"><!-- --></A><H3> |
| getContentTypeOfRequest</H3> |
| <PRE> |
| private final void <B>getContentTypeOfRequest</B>()</PRE> |
| <DL> |
| <DD>Gets the value of the Content-Type header of the request. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createLocalFile()"><!-- --></A><H3> |
| createLocalFile</H3> |
| <PRE> |
| protected java.io.File <B>createLocalFile</B>() |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Creates a file on disk from the current mulitpart element. |
| <P> |
| <DD><DL> |
| |
| <DD><CODE>java.io.IOException</CODE></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="../../../../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/MultipartIterator.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/struts/upload/MultipartElement.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/struts/upload/MultipartRequestWrapper.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="MultipartIterator.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 | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2000-2003 - Apache Software Foundation |
| </BODY> |
| </HTML> |