Class InternalFileItem
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.fileitem.InternalFileItem
-
- All Implemented Interfaces:
org.apache.commons.fileupload.FileItem
,org.apache.commons.fileupload.FileItemHeadersSupport
public class InternalFileItem extends Object implements org.apache.commons.fileupload.FileItem
File item created manually, without being retrieved from an HTTP request. Used to update an imported publication's form.- Author:
- Antoine HEDIN
-
-
Constructor Summary
Constructors Constructor Description InternalFileItem(String fieldName, String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
byte[]
get()
String
getContentType()
String
getFieldName()
org.apache.commons.fileupload.FileItemHeaders
getHeaders()
InputStream
getInputStream()
String
getName()
OutputStream
getOutputStream()
long
getSize()
String
getString()
String
getString(String arg0)
boolean
isFormField()
boolean
isInMemory()
void
setFieldName(String fieldName)
void
setFormField(boolean formField)
void
setHeaders(org.apache.commons.fileupload.FileItemHeaders fileItemHeaders)
void
setValue(String value)
void
write(File arg0)
-
-
-
Method Detail
-
setFieldName
public void setFieldName(String fieldName)
- Specified by:
setFieldName
in interfaceorg.apache.commons.fileupload.FileItem
-
getFieldName
public String getFieldName()
- Specified by:
getFieldName
in interfaceorg.apache.commons.fileupload.FileItem
-
setValue
public void setValue(String value)
-
getString
public String getString()
- Specified by:
getString
in interfaceorg.apache.commons.fileupload.FileItem
-
setFormField
public void setFormField(boolean formField)
- Specified by:
setFormField
in interfaceorg.apache.commons.fileupload.FileItem
-
isFormField
public boolean isFormField()
- Specified by:
isFormField
in interfaceorg.apache.commons.fileupload.FileItem
-
delete
public void delete()
- Specified by:
delete
in interfaceorg.apache.commons.fileupload.FileItem
-
get
public byte[] get()
- Specified by:
get
in interfaceorg.apache.commons.fileupload.FileItem
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceorg.apache.commons.fileupload.FileItem
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
IOException
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.apache.commons.fileupload.FileItem
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStream
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
IOException
-
getSize
public long getSize()
- Specified by:
getSize
in interfaceorg.apache.commons.fileupload.FileItem
-
getString
public String getString(String arg0) throws UnsupportedEncodingException
- Specified by:
getString
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
UnsupportedEncodingException
-
isInMemory
public boolean isInMemory()
- Specified by:
isInMemory
in interfaceorg.apache.commons.fileupload.FileItem
-
write
public void write(File arg0) throws Exception
- Specified by:
write
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
Exception
-
getHeaders
public org.apache.commons.fileupload.FileItemHeaders getHeaders()
- Specified by:
getHeaders
in interfaceorg.apache.commons.fileupload.FileItemHeadersSupport
-
setHeaders
public void setHeaders(org.apache.commons.fileupload.FileItemHeaders fileItemHeaders)
- Specified by:
setHeaders
in interfaceorg.apache.commons.fileupload.FileItemHeadersSupport
-
-