|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtools.fileup.MultipartRequest
MultipartRequest Class
$Id: MultipartRequest.java,v 1.2 2002/08/08 18:25:48 stfndln Exp $
Constructor Summary | |
MultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String saveDirectory)
|
|
MultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String saveDirectory,
int maxPostSize)
|
|
MultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String saveDirectory,
int maxPostSize,
java.lang.String filename)
|
|
MultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String saveDirectory,
java.lang.String filename)
|
|
MultipartRequest(javax.servlet.ServletRequest request,
java.lang.String saveDirectory)
|
|
MultipartRequest(javax.servlet.ServletRequest request,
java.lang.String saveDirectory,
int maxPostSize)
|
|
MultipartRequest(javax.servlet.ServletRequest request,
java.lang.String saveDirectory,
int maxPostSize,
java.lang.String filename)
|
|
MultipartRequest(javax.servlet.ServletRequest request,
java.lang.String saveDirectory,
java.lang.String filename)
|
Method Summary | |
java.lang.String |
getContentType(java.lang.String name)
Returns the content type of the specified file (as supplied by the client browser), or null if the file was not included in the upload. |
java.io.File |
getFile(java.lang.String name)
Returns a File object for the specified file saved on the server's filesystem, or null if the file was not included in the upload. |
java.util.Enumeration |
getFileNames()
Returns the names of all the uploaded files as an Enumeration of Strings. |
java.lang.String |
getFilesystemName(java.lang.String name)
Returns the filesystem name of the specified file, or null if the file was not included in the upload. |
java.lang.String |
getParameter(java.lang.String name)
Returns the value of the named parameter as a String, or null if the parameter was not sent or was sent without a value. |
java.util.Enumeration |
getParameterNames()
Returns the names of all the parameters as an Enumeration of Strings. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the values of the named parameter as a String array, or null if the parameter was not sent. |
protected void |
readAndSaveFile(org.jtools.fileup.MultipartInputStreamHandler in,
java.lang.String boundary,
java.lang.String filename,
java.lang.String contentType)
A utility method that reads a single part of the multipart request that represents a file, and saves the file to the given directory. |
protected boolean |
readNextPart(org.jtools.fileup.MultipartInputStreamHandler in,
java.lang.String boundary)
A utility method that reads an individual part. |
protected boolean |
readNextPart(org.jtools.fileup.MultipartInputStreamHandler in,
java.lang.String boundary,
java.lang.String newFilename)
|
protected java.lang.String |
readParameter(org.jtools.fileup.MultipartInputStreamHandler in,
java.lang.String boundary)
A utility method that reads a single part of the multipart request that represents a parameter. |
protected void |
readRequest()
The workhorse method that actually parses the request. |
protected void |
readRequest(java.lang.String filename)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MultipartRequest(javax.servlet.http.HttpServletRequest request, java.lang.String saveDirectory) throws java.io.IOException
public MultipartRequest(javax.servlet.http.HttpServletRequest request, java.lang.String saveDirectory, int maxPostSize) throws java.io.IOException
public MultipartRequest(javax.servlet.http.HttpServletRequest request, java.lang.String saveDirectory, java.lang.String filename) throws java.io.IOException
public MultipartRequest(javax.servlet.http.HttpServletRequest request, java.lang.String saveDirectory, int maxPostSize, java.lang.String filename) throws java.io.IOException
public MultipartRequest(javax.servlet.ServletRequest request, java.lang.String saveDirectory) throws java.io.IOException
public MultipartRequest(javax.servlet.ServletRequest request, java.lang.String saveDirectory, java.lang.String filename) throws java.io.IOException
public MultipartRequest(javax.servlet.ServletRequest request, java.lang.String saveDirectory, int maxPostSize) throws java.io.IOException
public MultipartRequest(javax.servlet.ServletRequest request, java.lang.String saveDirectory, int maxPostSize, java.lang.String filename) throws java.io.IOException
Method Detail |
public java.util.Enumeration getParameterNames()
public java.util.Enumeration getFileNames()
public java.lang.String getParameter(java.lang.String name)
name
- the parameter name
public java.lang.String[] getParameterValues(java.lang.String name)
name
- the parameter name
public java.lang.String getFilesystemName(java.lang.String name)
name
- the file name
public java.lang.String getContentType(java.lang.String name)
name
- the file name
public java.io.File getFile(java.lang.String name)
name
- the file name
protected void readRequest() throws java.io.IOException
java.io.IOException
- if the uploaded content is larger than
maxSize or there's a problem parsing the requestprotected void readRequest(java.lang.String filename) throws java.io.IOException
java.io.IOException
protected boolean readNextPart(org.jtools.fileup.MultipartInputStreamHandler in, java.lang.String boundary) throws java.io.IOException
in
- the stream from which to read the partboundary
- the boundary separating parts
java.io.IOException
- if there's a problem reading or parsing the
requestreadParameter
,
readAndSaveFile
protected boolean readNextPart(org.jtools.fileup.MultipartInputStreamHandler in, java.lang.String boundary, java.lang.String newFilename) throws java.io.IOException
java.io.IOException
protected java.lang.String readParameter(org.jtools.fileup.MultipartInputStreamHandler in, java.lang.String boundary) throws java.io.IOException
in
- the stream from which to read the parameter informationboundary
- the boundary signifying the end of this part
java.io.IOException
- if there's a problem reading or parsing the
requestprotected void readAndSaveFile(org.jtools.fileup.MultipartInputStreamHandler in, java.lang.String boundary, java.lang.String filename, java.lang.String contentType) throws java.io.IOException
in
- the stream from which to read the fileboundary
- the boundary signifying the end of this partfilename
- the name under which to save the uploaded file
java.io.IOException
- if there's a problem reading or parsing the
request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |