org.apache.struts.upload
クラス DiskFile

java.lang.Object
  拡張org.apache.struts.upload.DiskFile
すべての実装インタフェース:
FormFile

推奨されていません。 Use the Commons FileUpload based multipart handler instead. This class will be removed after Struts 1.2.

public class DiskFile
extends java.lang.Object
implements FormFile


フィールドの概要
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
 

フィールドの詳細

filePath

protected java.lang.String filePath
推奨されていません。 
The filepath to the temporary file


contentType

protected java.lang.String contentType
推奨されていません。 
The content type of the file


fileSize

protected int fileSize
推奨されていません。 
The size in bytes of the file


fileName

protected java.lang.String fileName
推奨されていません。 
The name of the file

コンストラクタの詳細

DiskFile

public DiskFile(java.lang.String filePath)
推奨されていません。 
メソッドの詳細

getFileData

public byte[] getFileData()
                   throws java.io.FileNotFoundException,
                          java.io.IOException
推奨されていません。 
Attempt to read the temporary file and get it's data in byte array form. Tries to read the entire file (using a byte array the size of getFileSize()) at once, in one call to FileInputStream.read(byte[]). For buffered reading, see 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 内の getFileData
戻り値:
The file data as a byte array.
例外:
java.io.FileNotFoundException - If the temp file no longer exists
java.io.IOException - if there is some sort of IO problem.
関連項目:
getFileData(int)

getFileData

public byte[] getFileData(int bufferSize)
                   throws java.io.FileNotFoundException,
                          java.io.IOException
推奨されていません。 
Attempts to read a file n bytes at a time, n being equal to "bufferSize". 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.

パラメータ:
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.IOException

destroy

public void destroy()
推奨されていません。 
Delete the temporary file.

定義:
インタフェース FormFile 内の destroy

getFilePath

public java.lang.String getFilePath()
推奨されていません。 
Get the temporary file path for this form file

戻り値:
A filepath to the temporary file

setFileName

public void setFileName(java.lang.String filename)
推奨されていません。 
Set the file name

定義:
インタフェース FormFile 内の setFileName
パラメータ:
filename - The base file name.

setContentType

public void setContentType(java.lang.String contentType)
推奨されていません。 
Set the content type

定義:
インタフェース FormFile 内の setContentType
パラメータ:
contentType - The content type for the file.

setFileSize

public void setFileSize(int fileSize)
推奨されていません。 
Set the file size

定義:
インタフェース FormFile 内の setFileSize
パラメータ:
fileSize - The size of the file in bytes

getFileName

public java.lang.String getFileName()
推奨されていません。 
Get the file name

定義:
インタフェース FormFile 内の getFileName
戻り値:
The base file name.

getContentType

public java.lang.String getContentType()
推奨されていません。 
Get the content type

定義:
インタフェース FormFile 内の getContentType
戻り値:
A String representing content type.

getFileSize

public int getFileSize()
推奨されていません。 
Get the file size

定義:
インタフェース FormFile 内の getFileSize
戻り値:
The size of this file in bytes

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException
推奨されていません。 
Returns a FileInputStream to the file

定義:
インタフェース FormFile 内の getInputStream
例外:
java.io.IOException - if an error occurred while reading the file.
java.io.FileNotFoundException - if the uploaded file is not found.


このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation