|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.apache.struts.upload.CommonsMultipartRequestHandler.CommonsFormFile
This class implements the Struts FormFile interface by
wrapping the Commons FileUpload FileItem interface. This
implementation is read-only; any attempt to modify an instance
of this class will result in an UnsupportedOperationException.
| フィールドの概要 | |
(パッケージプライベート) org.apache.commons.fileupload.FileItem |
fileItem
The FileItem instance wrapped by this object. |
| コンストラクタの概要 | |
CommonsMultipartRequestHandler.CommonsFormFile(org.apache.commons.fileupload.FileItem fileItem)
Constructs an instance of this class which wraps the supplied file item. |
|
| メソッドの概要 | |
void |
destroy()
Destroy all content for this form file. |
protected java.lang.String |
getBaseFileName(java.lang.String filePath)
Returns the base file name from the supplied file path. |
java.lang.String |
getContentType()
Returns the content type for this file. |
byte[] |
getFileData()
Returns the data for this file as a byte array. |
java.lang.String |
getFileName()
Returns the (client-side) file name for this file. |
int |
getFileSize()
Returns the size, in bytes, of this file. |
java.io.InputStream |
getInputStream()
Get an InputStream that represents this file. |
void |
setContentType(java.lang.String contentType)
Sets the content type for this file. |
void |
setFileName(java.lang.String fileName)
Sets the (client-side) file name for this file. |
void |
setFileSize(int filesize)
Sets the size, in bytes, for this file. |
java.lang.String |
toString()
Returns the (client-side) file name for this file. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| フィールドの詳細 |
org.apache.commons.fileupload.FileItem fileItem
FileItem instance wrapped by this object.
| コンストラクタの詳細 |
public CommonsMultipartRequestHandler.CommonsFormFile(org.apache.commons.fileupload.FileItem fileItem)
fileItem - The Commons file item to be wrapped.| メソッドの詳細 |
public java.lang.String getContentType()
FormFile 内の getContentTypepublic void setContentType(java.lang.String contentType)
NOTE: This method is not supported in this implementation.
FormFile 内の setContentTypecontentType - A string representing the content type.public int getFileSize()
FormFile 内の getFileSizepublic void setFileSize(int filesize)
NOTE: This method is not supported in this implementation.
FormFile 内の setFileSizefilesize - The size of the file, in bytes.public java.lang.String getFileName()
FormFile 内の getFileNamepublic void setFileName(java.lang.String fileName)
NOTE: This method is not supported in this implementation.
FormFile 内の setFileNamefileName - The client-side name for the file.
public byte[] getFileData()
throws java.io.FileNotFoundException,
java.io.IOException
getInputStream method is encouraged
as an alternative.
FormFile 内の getFileDatajava.io.FileNotFoundException - If some sort of file representation
cannot be found for the FormFile
java.io.IOException - If there is some sort of IOException
public java.io.InputStream getInputStream()
throws java.io.FileNotFoundException,
java.io.IOException
FormFile 内の getInputStreamjava.io.FileNotFoundException - If some sort of file representation
cannot be found for the FormFile
java.io.IOException - If there is some sort of IOExceptionpublic void destroy()
FormFile 内の destroyprotected java.lang.String getBaseFileName(java.lang.String filePath)
File.getName() correctly for Windows
paths, so we attempt to take care of that here.
filePath - The full path to the file.
public java.lang.String toString()
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||