Package hudson.model
Class FileParameterValue.FileItemImpl
- java.lang.Object
-
- hudson.model.FileParameterValue.FileItemImpl
-
- All Implemented Interfaces:
org.apache.commons.fileupload.FileItem
,org.apache.commons.fileupload.FileItemHeadersSupport
- Enclosing class:
- FileParameterValue
public static final class FileParameterValue.FileItemImpl extends Object implements org.apache.commons.fileupload.FileItem
Default implementation fromFile
.
-
-
Constructor Summary
Constructors Constructor Description FileItemImpl(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated 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()
Deprecated.long
getSize()
String
getString()
String
getString(String encoding)
boolean
isFormField()
boolean
isInMemory()
void
setFieldName(String name)
void
setFormField(boolean state)
void
setHeaders(org.apache.commons.fileupload.FileItemHeaders headers)
void
write(File to)
-
-
-
Constructor Detail
-
FileItemImpl
public FileItemImpl(File file)
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
IOException
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceorg.apache.commons.fileupload.FileItem
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.apache.commons.fileupload.FileItem
-
isInMemory
public boolean isInMemory()
- Specified by:
isInMemory
in interfaceorg.apache.commons.fileupload.FileItem
-
getSize
public long getSize()
- Specified by:
getSize
in interfaceorg.apache.commons.fileupload.FileItem
-
get
public byte[] get()
- Specified by:
get
in interfaceorg.apache.commons.fileupload.FileItem
-
getString
public String getString(String encoding) throws UnsupportedEncodingException
- Specified by:
getString
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
UnsupportedEncodingException
-
getString
public String getString()
- Specified by:
getString
in interfaceorg.apache.commons.fileupload.FileItem
-
write
public void write(File to) throws Exception
- Specified by:
write
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
Exception
-
delete
public void delete()
- Specified by:
delete
in interfaceorg.apache.commons.fileupload.FileItem
-
getFieldName
public String getFieldName()
- Specified by:
getFieldName
in interfaceorg.apache.commons.fileupload.FileItem
-
setFieldName
public void setFieldName(String name)
- Specified by:
setFieldName
in interfaceorg.apache.commons.fileupload.FileItem
-
isFormField
public boolean isFormField()
- Specified by:
isFormField
in interfaceorg.apache.commons.fileupload.FileItem
-
setFormField
public void setFormField(boolean state)
- Specified by:
setFormField
in interfaceorg.apache.commons.fileupload.FileItem
-
getOutputStream
@Deprecated public OutputStream getOutputStream() throws IOException
Deprecated.- Specified by:
getOutputStream
in interfaceorg.apache.commons.fileupload.FileItem
- Throws:
IOException
-
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 headers)
- Specified by:
setHeaders
in interfaceorg.apache.commons.fileupload.FileItemHeadersSupport
-
-