org.tinygroup.weblayer.webcontext.parser.fileupload
类 TinyFileItem

java.lang.Object
  继承者 org.tinygroup.weblayer.webcontext.parser.fileupload.TinyFileItem
所有已实现的接口:
Serializable, org.apache.commons.fileupload.FileItem

public class TinyFileItem
extends Object
implements org.apache.commons.fileupload.FileItem

功能说明: tiny保存的文件项

系统版本: v1.0
开发人员: renhui
开发时间: 2014-1-2
功能描述: 写明作用,调用方式,使用场景,以及特殊情况

另请参见:
序列化表格

字段摘要
static String DEFAULT_CHARSET
          Default content charset to be used when no explicit charset parameter is provided by the sender.
 
构造方法摘要
TinyFileItem(String fieldName, String contentType, boolean isFormField, String fileName, FileItemStorage storage)
           
 
方法摘要
 void delete()
           
 byte[] get()
           
 String getCharset()
          取得当前field的字符集编码。
 String getContentType()
           
 String getFieldName()
           
 InputStream getInputStream()
           
 String getName()
           
 OutputStream getOutputStream()
           
 long getSize()
           
 String getString()
           
 String getString(String encoding)
           
 String getUnique()
           
 boolean isFormField()
           
 boolean isInMemory()
           
 void setCharset(String charset)
          设置当前field的字符集编码。
 void setFieldName(String name)
           
 void setFormField(boolean state)
           
 void setUnique(String unique)
           
 void storage()
          调用存储接口
 String toString()
          Returns a string representation of this object.
 void write(File file)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

DEFAULT_CHARSET

public static final String DEFAULT_CHARSET
Default content charset to be used when no explicit charset parameter is provided by the sender. Media subtypes of the "text" type are defined to have a default charset value of "ISO-8859-1" when received via HTTP.

另请参见:
常量字段值
构造方法详细信息

TinyFileItem

public TinyFileItem(String fieldName,
                    String contentType,
                    boolean isFormField,
                    String fileName,
                    FileItemStorage storage)
方法详细信息

getInputStream

public InputStream getInputStream()
                           throws IOException
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getInputStream
抛出:
IOException

getContentType

public String getContentType()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getContentType

getName

public String getName()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getName

isInMemory

public boolean isInMemory()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 isInMemory

getSize

public long getSize()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getSize

get

public byte[] get()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 get

getString

public String getString(String encoding)
                 throws UnsupportedEncodingException
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getString
抛出:
UnsupportedEncodingException

getString

public String getString()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getString

write

public void write(File file)
           throws Exception
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 write
抛出:
Exception

storage

public void storage()
调用存储接口


delete

public void delete()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 delete

getFieldName

public String getFieldName()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getFieldName

setFieldName

public void setFieldName(String name)
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 setFieldName

isFormField

public boolean isFormField()
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 isFormField

setFormField

public void setFormField(boolean state)
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 setFormField

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
指定者:
接口 org.apache.commons.fileupload.FileItem 中的 getOutputStream
抛出:
IOException

getCharset

public String getCharset()
取得当前field的字符集编码。


setCharset

public void setCharset(String charset)
设置当前field的字符集编码。


getUnique

public String getUnique()

setUnique

public void setUnique(String unique)

toString

public String toString()
Returns a string representation of this object.

覆盖:
Object 中的 toString
返回:
a string representation of this object.


Copyright © 2006–2014 开源组织. All rights reserved.