public class FilePartSource extends java.lang.Object implements PartSource
| 构造器和说明 |
|---|
FilePartSource(java.io.File file)
Constructor for FilePartSource.
|
FilePartSource(java.lang.String fileName,
java.io.File file)
Constructor for FilePartSource.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.io.InputStream |
createInputStream()
Return a new
FileInputStream for the current filename. |
java.lang.String |
getFileName()
Return the current filename
|
long |
getLength()
Return the length of the file
|
public FilePartSource(java.io.File file)
throws java.io.FileNotFoundException
file - the FilePart source File.java.io.FileNotFoundException - if the file does not exist or
cannot be readpublic FilePartSource(java.lang.String fileName,
java.io.File file)
throws java.io.FileNotFoundException
fileName - the file name of the FilePartfile - the source File for the FilePartjava.io.FileNotFoundException - if the file does not exist or
cannot be readpublic long getLength()
getLength 在接口中 PartSourcePartSource.getLength()public java.lang.String getFileName()
getFileName 在接口中 PartSourcePartSource.getFileName()public java.io.InputStream createInputStream()
throws java.io.IOException
FileInputStream for the current filename.createInputStream 在接口中 PartSourcejava.io.IOException - If an IO problem occurs.PartSource.createInputStream()