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