|
Apache Tomcat 7.0.42 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.catalina.core.ApplicationPart
public class ApplicationPart
Adaptor to allow FileItem objects generated by the package renamed
commons-upload to be used by the Servlet 3.0 upload API that expects
Parts.
| Constructor Summary | |
|---|---|
ApplicationPart(FileItem fileItem,
File location)
|
|
| Method Summary | |
|---|---|
void |
delete()
Deletes the underlying storage for a part, including deleting any associated temporary disk file. |
String |
getContentType()
Obtain the content type passed by the browser or null if not
defined. |
String |
getFilename()
Deprecated. Use getSubmittedFileName() from Servlet 3.1 instead.
This method will be removed in Tomcat 8. |
String |
getHeader(String name)
Obtains the value of the specified part header as a String. |
Collection<String> |
getHeaderNames()
Returns a Collection of all the header names provided for this part. |
Collection<String> |
getHeaders(String name)
Obtain all the values of the specified part header. |
InputStream |
getInputStream()
Obtain an InputStream that can be used to retrieve the
contents of the file. |
String |
getName()
Obtain the name of the field in the multipart form corresponding to this part. |
long |
getSize()
Obtain the size of this part. |
String |
getString(String encoding)
|
String |
getSubmittedFileName()
Adapted from FileUploadBase.getFileName(). |
void |
write(String fileName)
A convenience method to write an uploaded part to disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationPart(FileItem fileItem,
File location)
| Method Detail |
|---|
public void delete()
throws IOException
javax.servlet.http.PartContainers are only required to delete the associated storage when the Part instance is garbage collected. Apache Tomcat will delete the associated storage when the associated request has finished processing. Behaviour of other containers may be different.
delete in interface PartIOExceptionpublic String getContentType()
javax.servlet.http.Partnull if not
defined.
getContentType in interface Partpublic String getHeader(String name)
javax.servlet.http.Part
getHeader in interface Partname - Header name
null if the header is not
presentpublic Collection<String> getHeaderNames()
javax.servlet.http.Part
getHeaderNames in interface Partpublic Collection<String> getHeaders(String name)
javax.servlet.http.Part
getHeaders in interface Part
public InputStream getInputStream()
throws IOException
javax.servlet.http.PartInputStream that can be used to retrieve the
contents of the file.
getInputStream in interface PartIOExceptionpublic String getName()
javax.servlet.http.Part
getName in interface Partpublic long getSize()
javax.servlet.http.Part
getSize in interface Part
public void write(String fileName)
throws IOException
javax.servlet.http.Part
write in interface PartfileName - The location into which the uploaded part should be
stored. Relative locations are relative to MultipartConfigElement.getLocation()
IOException
public String getString(String encoding)
throws UnsupportedEncodingException
UnsupportedEncodingException@Deprecated public String getFilename()
getSubmittedFileName() from Servlet 3.1 instead.
This method will be removed in Tomcat 8.
getSubmittedFileName().
public String getSubmittedFileName()
|
Apache Tomcat 7.0.42 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||