http.utils.multipartrequest
Class CgiMultipartRequest
java.lang.Object
http.utils.multipartrequest.MultipartRequest
http.utils.multipartrequest.CgiMultipartRequest
- public class CgiMultipartRequest
- extends MultipartRequest
A Multipart form data parser. Parses an input stream and writes out any files found,
making available a hashtable of other url parameters. As of version 1.17 the files can
be saved to memory, and optionally written to a database, etc.
Copyright (c)2001-2003 Jason Pell.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Email: jasonpell@hotmail.com
Url: http://www.geocities.com/jasonpell
Wrapper for MultipartRequest
Fields inherited from class http.utils.multipartrequest.MultipartRequest |
ABORT_IF_MAX_BYES_EXCEEDED, CONTENT_TYPE, CONTENTS, DEF_ENCODING, FILENAME, IGNORE_FILES_IF_MAX_BYES_EXCEEDED, MAX_READ_BYTES, RAW_FILENAME, READ_LINE_BLOCK, SIZE, TMP_FILENAME |
Methods inherited from class http.utils.multipartrequest.MultipartRequest |
debug, getBaseFilename, getContentType, getEncoding, getFile, getFileContents, getFileParameter, getFileParameterNames, getFileSize, getFileSystemName, getHtmlTable, getParameterNames, getRawFilename, getURLParameter, getURLParameters, isMaxBytesExceeded, setEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CgiMultipartRequest
public CgiMultipartRequest(java.lang.String strSaveDirectory)
throws java.lang.IllegalArgumentException,
java.io.IOException,
java.lang.NumberFormatException
- Standard Constructor
- Parameters:
strSaveDirectory
- The temporary directory to save the file from where they can then be moved to wherever by the
calling process. If you specify null for this parameter, then any files uploaded
will be silently ignored.
- Throws:
java.lang.IllegalArgumentException
- If the System.getProperty("CONTENT_TYPE") does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
java.io.IOException
- If the System.getProperty("CONTENT_LENGTH") is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
java.lang.NumberFormatException
- See Also:
MultipartRequest.MAX_READ_BYTES
CgiMultipartRequest
public CgiMultipartRequest(java.lang.String strSaveDirectory,
int intMaxReadBytes)
throws java.lang.IllegalArgumentException,
java.io.IOException,
java.lang.NumberFormatException
- Standard Constructor
- Parameters:
strSaveDirectory
- The temporary directory to save the file from where they can then be moved to wherever by the
calling process. If you specify null for this parameter, then any files uploaded
will be silently ignored.intMaxReadBytes
- Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
- Throws:
java.lang.IllegalArgumentException
- If the System.getProperty("CONTENT_TYPE") does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
java.io.IOException
- If the System.getProperty("CONTENT_LENGTH") is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
java.lang.NumberFormatException
- See Also:
MultipartRequest.MAX_READ_BYTES
CgiMultipartRequest
public CgiMultipartRequest(int intMaxReadBytes)
throws java.lang.IllegalArgumentException,
java.io.IOException,
java.lang.NumberFormatException
- Memory Constructor
- Parameters:
intMaxReadBytes
- Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
- Throws:
java.lang.IllegalArgumentException
- If the System.getProperty("CONTENT_TYPE") does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
java.io.IOException
- If the System.getProperty("CONTENT_LENGTH") is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
java.lang.NumberFormatException
- See Also:
MultipartRequest.MAX_READ_BYTES