|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.apache.struts.upload.DiskFile
| フィールドの概要 | |
protected java.lang.String |
contentType
推奨されていません。 The content type of the file |
protected java.lang.String |
fileName
推奨されていません。 The name of the file |
protected java.lang.String |
filePath
推奨されていません。 The filepath to the temporary file |
protected int |
fileSize
推奨されていません。 The size in bytes of the file |
| コンストラクタの概要 | |
DiskFile(java.lang.String filePath)
推奨されていません。 |
|
| メソッドの概要 | |
void |
destroy()
推奨されていません。 Delete the temporary file. |
java.lang.String |
getContentType()
推奨されていません。 Get the content type |
byte[] |
getFileData()
推奨されていません。 Attempt to read the temporary file and get it's data in byte array form. |
byte[] |
getFileData(int bufferSize)
推奨されていません。 Attempts to read a file n bytes at a time, n being equal to "bufferSize". |
java.lang.String |
getFileName()
推奨されていません。 Get the file name |
java.lang.String |
getFilePath()
推奨されていません。 Get the temporary file path for this form file |
int |
getFileSize()
推奨されていません。 Get the file size |
java.io.InputStream |
getInputStream()
推奨されていません。 Returns a FileInputStream to the file |
void |
setContentType(java.lang.String contentType)
推奨されていません。 Set the content type |
void |
setFileName(java.lang.String filename)
推奨されていません。 Set the file name |
void |
setFileSize(int fileSize)
推奨されていません。 Set the file size |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
protected java.lang.String filePath
protected java.lang.String contentType
protected int fileSize
protected java.lang.String fileName
| コンストラクタの詳細 |
public DiskFile(java.lang.String filePath)
| メソッドの詳細 |
public byte[] getFileData()
throws java.io.FileNotFoundException,
java.io.IOException
getFileData(int).
Note that this method can be dangerous, and that the size of a file
can cause an OutOfMemoryError quite easily. You should use
getInputStream and do your own thing.
FormFile 内の getFileDatajava.io.FileNotFoundException - If the temp file no longer exists
java.io.IOException - if there is some sort of IO problem.getFileData(int)
public byte[] getFileData(int bufferSize)
throws java.io.FileNotFoundException,
java.io.IOException
getInputStream and do your own thing.
bufferSize - The size in bytes that are read from the file at a time
java.io.FileNotFoundException - If the temp file no longer exists
java.io.IOExceptionpublic void destroy()
FormFile 内の destroypublic java.lang.String getFilePath()
public void setFileName(java.lang.String filename)
FormFile 内の setFileNamefilename - The base file name.public void setContentType(java.lang.String contentType)
FormFile 内の setContentTypecontentType - The content type for the file.public void setFileSize(int fileSize)
FormFile 内の setFileSizefileSize - The size of the file in bytespublic java.lang.String getFileName()
FormFile 内の getFileNamepublic java.lang.String getContentType()
FormFile 内の getContentTypepublic int getFileSize()
FormFile 内の getFileSize
public java.io.InputStream getInputStream()
throws java.io.FileNotFoundException,
java.io.IOException
FormFile 内の getInputStreamjava.io.IOException - if an error occurred while reading the
file.
java.io.FileNotFoundException - if the uploaded file is not found.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||