public class TinyFileItem extends Object implements org.apache.commons.fileupload.FileItem
开发人员: renhui
开发时间: 2014-1-2
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARSET
Default content charset to be used when no explicit charset parameter is
provided by the sender.
|
Constructor and Description |
---|
TinyFileItem(String fieldName,
String contentType,
boolean isFormField,
String fileName,
FileItemStorage storage) |
Modifier and Type | Method and Description |
---|---|
void |
delete() |
byte[] |
get() |
String |
getCharset()
取得当前field的字符集编码。
|
String |
getContentType() |
String |
getFieldName() |
FileObject |
getFileObject() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
long |
getSize() |
String |
getString() |
String |
getString(String encoding) |
boolean |
isFormField() |
boolean |
isInMemory() |
void |
setCharset(String charset)
设置当前field的字符集编码。
|
void |
setFieldName(String name) |
void |
setFormField(boolean state) |
void |
storage()
调用存储接口
|
String |
toString()
Returns a string representation of this object.
|
void |
write(File file) |
public static final String DEFAULT_CHARSET
public TinyFileItem(String fieldName, String contentType, boolean isFormField, String fileName, FileItemStorage storage)
public InputStream getInputStream() throws IOException
getInputStream
in interface org.apache.commons.fileupload.FileItem
IOException
public String getContentType()
getContentType
in interface org.apache.commons.fileupload.FileItem
public String getName()
getName
in interface org.apache.commons.fileupload.FileItem
public boolean isInMemory()
isInMemory
in interface org.apache.commons.fileupload.FileItem
public long getSize()
getSize
in interface org.apache.commons.fileupload.FileItem
public byte[] get()
get
in interface org.apache.commons.fileupload.FileItem
public String getString(String encoding) throws UnsupportedEncodingException
getString
in interface org.apache.commons.fileupload.FileItem
UnsupportedEncodingException
public String getString()
getString
in interface org.apache.commons.fileupload.FileItem
public void write(File file) throws Exception
write
in interface org.apache.commons.fileupload.FileItem
Exception
public void storage()
public FileObject getFileObject()
public void delete()
delete
in interface org.apache.commons.fileupload.FileItem
public String getFieldName()
getFieldName
in interface org.apache.commons.fileupload.FileItem
public void setFieldName(String name)
setFieldName
in interface org.apache.commons.fileupload.FileItem
public boolean isFormField()
isFormField
in interface org.apache.commons.fileupload.FileItem
public void setFormField(boolean state)
setFormField
in interface org.apache.commons.fileupload.FileItem
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface org.apache.commons.fileupload.FileItem
IOException
public String getCharset()
public void setCharset(String charset)
Copyright © 2006–2018 TinyGroup. All rights reserved.