public class GenAttFileItem extends Object implements org.apache.commons.fileupload.FileItem
Constructor and Description |
---|
GenAttFileItem(byte[] bValue,
String strFileName)
Creates a new file item
|
GenAttFileItem(byte[] bValue,
String strFileName,
int nIdResponse)
Creates a new file item
|
GenAttFileItem(byte[] bValue,
String strFileName,
String strFieldName,
int nIdResponse)
Creates a new file item
|
Modifier and Type | Method and Description |
---|---|
void |
delete() |
byte[] |
get() |
String |
getContentType() |
String |
getFieldName() |
org.apache.commons.fileupload.FileItemHeaders |
getHeaders() |
int |
getIdResponse()
Get the id of the associated response, if any
|
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
long |
getSize() |
String |
getString() |
String |
getString(String encoding) |
boolean |
isFormField() |
boolean |
isInMemory() |
void |
setFieldName(String strName) |
void |
setFormField(boolean bState) |
void |
setHeaders(org.apache.commons.fileupload.FileItemHeaders headers) |
void |
setIdResponse(int nIdResponse)
Set the id of the associated response, if any
|
void |
write(File file) |
public GenAttFileItem(byte[] bValue, String strFileName)
bValue
- the byte valuestrFileName
- the file namepublic GenAttFileItem(byte[] bValue, String strFileName, int nIdResponse)
bValue
- the byte valuestrFileName
- the file namenIdResponse
- The id of the response associated with this file item if anypublic GenAttFileItem(byte[] bValue, String strFileName, String strFieldName, int nIdResponse)
bValue
- the byte valuestrFileName
- the file namestrFieldName
- The name of the HTML field associated with this file, if anynIdResponse
- The id of the response associated with this file item if anypublic void delete()
delete
in interface org.apache.commons.fileupload.FileItem
public byte[] get()
get
in interface org.apache.commons.fileupload.FileItem
public String getContentType()
getContentType
in interface org.apache.commons.fileupload.FileItem
public String getFieldName()
getFieldName
in interface org.apache.commons.fileupload.FileItem
public InputStream getInputStream() throws IOException
getInputStream
in interface org.apache.commons.fileupload.FileItem
IOException
public String getName()
getName
in interface org.apache.commons.fileupload.FileItem
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface org.apache.commons.fileupload.FileItem
IOException
public long getSize()
getSize
in interface org.apache.commons.fileupload.FileItem
public String getString()
getString
in interface org.apache.commons.fileupload.FileItem
public String getString(String encoding) throws UnsupportedEncodingException
getString
in interface org.apache.commons.fileupload.FileItem
UnsupportedEncodingException
public int getIdResponse()
public boolean isFormField()
isFormField
in interface org.apache.commons.fileupload.FileItem
public boolean isInMemory()
isInMemory
in interface org.apache.commons.fileupload.FileItem
public void setFieldName(String strName)
setFieldName
in interface org.apache.commons.fileupload.FileItem
public void setFormField(boolean bState)
setFormField
in interface org.apache.commons.fileupload.FileItem
public void setIdResponse(int nIdResponse)
nIdResponse
- The id of the associated response, if anypublic void write(File file) throws Exception
write
in interface org.apache.commons.fileupload.FileItem
Exception
public org.apache.commons.fileupload.FileItemHeaders getHeaders()
getHeaders
in interface org.apache.commons.fileupload.FileItemHeadersSupport
public void setHeaders(org.apache.commons.fileupload.FileItemHeaders headers)
setHeaders
in interface org.apache.commons.fileupload.FileItemHeadersSupport
Copyright © 2021 City of Paris. All rights reserved.