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.FileItemIOExceptionpublic String getContentType()
getContentType in interface org.apache.commons.fileupload.FileItempublic String getName()
getName in interface org.apache.commons.fileupload.FileItempublic boolean isInMemory()
isInMemory in interface org.apache.commons.fileupload.FileItempublic long getSize()
getSize in interface org.apache.commons.fileupload.FileItempublic byte[] get()
get in interface org.apache.commons.fileupload.FileItempublic String getString(String encoding) throws UnsupportedEncodingException
getString in interface org.apache.commons.fileupload.FileItemUnsupportedEncodingExceptionpublic String getString()
getString in interface org.apache.commons.fileupload.FileItempublic void write(File file) throws Exception
write in interface org.apache.commons.fileupload.FileItemExceptionpublic void storage()
public FileObject getFileObject()
public void delete()
delete in interface org.apache.commons.fileupload.FileItempublic String getFieldName()
getFieldName in interface org.apache.commons.fileupload.FileItempublic void setFieldName(String name)
setFieldName in interface org.apache.commons.fileupload.FileItempublic boolean isFormField()
isFormField in interface org.apache.commons.fileupload.FileItempublic void setFormField(boolean state)
setFormField in interface org.apache.commons.fileupload.FileItempublic OutputStream getOutputStream() throws IOException
getOutputStream in interface org.apache.commons.fileupload.FileItemIOExceptionpublic String getCharset()
public void setCharset(String charset)
Copyright © 2006–2018 TinyGroup. All rights reserved.