Package de.xima.fc.http
Class FileItemPart
- java.lang.Object
-
- de.xima.fc.http.FileItemPart
-
- All Implemented Interfaces:
javax.servlet.http.Part
public class FileItemPart extends Object implements javax.servlet.http.Part
A part or a form item of amultipart/form-data
POST request that is based upon aFileItem
.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH, Dresden
-
-
Constructor Summary
Constructors Constructor Description FileItemPart(org.apache.commons.fileupload.FileItem fileItem)
Constructor for the Part.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
String
getContentType()
String
getHeader(String name)
Collection<String>
getHeaderNames()
Collection<String>
getHeaders(String name)
InputStream
getInputStream()
String
getName()
long
getSize()
String
getSubmittedFileName()
void
write(String fileName)
-
-
-
Constructor Detail
-
FileItemPart
public FileItemPart(org.apache.commons.fileupload.FileItem fileItem)
Constructor for the Part.- Parameters:
fileItem
- that the part is based on.- Throws:
NullPointerException
- if no file Item is given.
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfacejavax.servlet.http.Part
- Throws:
IOException
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfacejavax.servlet.http.Part
-
getName
public String getName()
- Specified by:
getName
in interfacejavax.servlet.http.Part
-
getSubmittedFileName
public String getSubmittedFileName()
- Specified by:
getSubmittedFileName
in interfacejavax.servlet.http.Part
-
getSize
public long getSize()
- Specified by:
getSize
in interfacejavax.servlet.http.Part
-
write
public void write(String fileName) throws IOException
- Specified by:
write
in interfacejavax.servlet.http.Part
- Throws:
IOException
-
delete
public void delete() throws IOException
- Specified by:
delete
in interfacejavax.servlet.http.Part
- Throws:
IOException
-
getHeader
public String getHeader(String name)
- Specified by:
getHeader
in interfacejavax.servlet.http.Part
-
getHeaders
public Collection<String> getHeaders(String name)
- Specified by:
getHeaders
in interfacejavax.servlet.http.Part
-
getHeaderNames
public Collection<String> getHeaderNames()
- Specified by:
getHeaderNames
in interfacejavax.servlet.http.Part
-
-