com.beetle.framework.web.controller.upload
类 FileObj

java.lang.Object
  继承者 com.beetle.framework.web.controller.upload.FileObj

public class FileObj
extends java.lang.Object

Title: BeetleWeb

Description: 文件对象

Copyright: Copyright (c) 2005

Company: 甲壳虫软件

版本:
1.0
作者:
余浩东(hdyu@beetlesoft.net)

构造方法摘要
FileObj(FileItem fi)
           
 
方法摘要
 void delete()
          Deletes the underlying storage for a file item, including deleting any associated temporary disk file.
 byte[] get()
          Returns the contents of the file item as an array of bytes.
 java.lang.String getFileName()
          获取文件名(含路径)
 long getFileSize()
          返回文件大小
 java.io.InputStream getInputStream()
          Returns an InputStream that can be used to retrieve the contents of the file.
 java.lang.String getNameWithoutPath()
          获取文件名(不带路径)
 java.io.OutputStream getOutputStream()
          Returns an OutputStream that can be used for storing the contents of the file.
 void write(java.io.File file)
          A convenience method to write an uploaded item to disk
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

FileObj

public FileObj(FileItem fi)
方法详细信息

getFileName

public java.lang.String getFileName()
获取文件名(含路径)

返回:
String

getNameWithoutPath

public java.lang.String getNameWithoutPath()
获取文件名(不带路径)

返回:

get

public byte[] get()
Returns the contents of the file item as an array of bytes.

返回:
byte[]

delete

public void delete()
Deletes the underlying storage for a file item, including deleting any associated temporary disk file.


write

public void write(java.io.File file)
           throws java.lang.Exception
A convenience method to write an uploaded item to disk

参数:
file - File
抛出:
java.lang.Exception

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an InputStream that can be used to retrieve the contents of the file.

返回:
InputStream
抛出:
java.io.IOException

getFileSize

public long getFileSize()
返回文件大小

返回:
long

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns an OutputStream that can be used for storing the contents of the file.

返回:
OutputStream
抛出:
java.io.IOException