文件的上传的说明
方法摘要说明
void destroy()销毁所有内容为上传的文件,包括任何潜在的数据文件。
java.lang.String getContentType()返回的内容类型为这个数据文件。
byte[] getFileData()传回的数据为整个文件作为字节数组。
java.lang.String getFileName()传回的数据文件名称,这个数据文件。
int getFileSize() 返回数据文件的大小
java.io.InputStream getInputStream()返回一个输入流此数据文件。
void setContentType(java.lang.String contentType)这个数据文件位集合的数据类型
void setFileName(java.lang.String fileName)返回的集合的数据文件名称
void setFileSize(int fileSize)设置文件的大小
getContentType
public java.lang.String getContentType()
返回的内容类型为这个档案。
Returns:
A String representing content type.
setContentType
public void setContentType(java.lang.String contentType)
Parameters:
contentType - The content type for the file.
getFileSize
public int getFileSize()
Returns:
The size of the file, in bytes.
--------------------------------------------------------------------------------
setFileSize
public void setFileSize(int fileSize)
Parameters:
fileSize - The size of the file, in bytes,
--------------------------------------------------------------------------------
getFileName
public java.lang.String getFileName()Returns the file name of this file.
This is the base name of the file, as supplied by the user when the file was uploaded.
Returns:
The base file name.
--------------------------------------------------------------------------------
setFileName
public void setFileName(java.lang.String fileName)Sets the file name of this file.
Parameters:
fileName - The base file name.
--------------------------------------------------------------------------------
getFileData
public byte[] getFileData() throws java.io.FileNotFoundException,
java.io.IOException
Returns:
The file data as a byte array.
Throws:
java.io.FileNotFoundException - if the uploaded file is not found.
java.io.IOException - if an error occurred while reading the file.
--------------------------------------------------------------------------------
getInputStream
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException,
java.io.IOException
Throws:
java.io.FileNotFoundException - if the uploaded file is not found.
java.io.IOException - if an error occurred while reading the file.
--------------------------------------------------------------------------------
destroy
public void destroy()Destroys all content for the uploaded file, including any underlying data files.
方法摘要说明
void destroy()销毁所有内容为上传的文件,包括任何潜在的数据文件。
java.lang.String getContentType()返回的内容类型为这个数据文件。
byte[] getFileData()传回的数据为整个文件作为字节数组。
java.lang.String getFileName()传回的数据文件名称,这个数据文件。
int getFileSize() 返回数据文件的大小
java.io.InputStream getInputStream()返回一个输入流此数据文件。
void setContentType(java.lang.String contentType)这个数据文件位集合的数据类型
void setFileName(java.lang.String fileName)返回的集合的数据文件名称
void setFileSize(int fileSize)设置文件的大小
getContentType
public java.lang.String getContentType()
返回的内容类型为这个档案。
Returns:
A String representing content type.
setContentType
public void setContentType(java.lang.String contentType)
Parameters:
contentType - The content type for the file.
getFileSize
public int getFileSize()
Returns:
The size of the file, in bytes.
--------------------------------------------------------------------------------
setFileSize
public void setFileSize(int fileSize)
Parameters:
fileSize - The size of the file, in bytes,
--------------------------------------------------------------------------------
getFileName
public java.lang.String getFileName()Returns the file name of this file.
This is the base name of the file, as supplied by the user when the file was uploaded.
Returns:
The base file name.
--------------------------------------------------------------------------------
setFileName
public void setFileName(java.lang.String fileName)Sets the file name of this file.
Parameters:
fileName - The base file name.
--------------------------------------------------------------------------------
getFileData
public byte[] getFileData() throws java.io.FileNotFoundException,
java.io.IOException
Returns:
The file data as a byte array.
Throws:
java.io.FileNotFoundException - if the uploaded file is not found.
java.io.IOException - if an error occurred while reading the file.
--------------------------------------------------------------------------------
getInputStream
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException,
java.io.IOException
Throws:
java.io.FileNotFoundException - if the uploaded file is not found.
java.io.IOException - if an error occurred while reading the file.
--------------------------------------------------------------------------------
destroy
public void destroy()Destroys all content for the uploaded file, including any underlying data files.