im.yixin.sdk.http.multipart
类 FilePartSource

java.lang.Object
  继承者 im.yixin.sdk.http.multipart.FilePartSource
所有已实现的接口:
PartSource

public class FilePartSource
extends java.lang.Object
implements PartSource

A PartSource that reads from a File.

从以下版本开始:
2.0

构造方法摘要
FilePartSource(java.lang.String ofile, 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
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

FilePartSource

public FilePartSource(java.lang.String ofile,
                      java.io.File file)
               throws java.io.FileNotFoundException
Constructor for FilePartSource.

参数:
file - the FilePart source File.
抛出:
java.io.FileNotFoundException - if the file does not exist or cannot be read
方法详细信息

getLength

public long getLength()
Return the length of the file

指定者:
接口 PartSource 中的 getLength
返回:
the length of the file.
另请参见:
PartSource.getLength()

getFileName

public java.lang.String getFileName()
Return the current filename

指定者:
接口 PartSource 中的 getFileName
返回:
the filename.
另请参见:
PartSource.getFileName()

createInputStream

public java.io.InputStream createInputStream()
                                      throws java.io.IOException
Return a new FileInputStream for the current filename.

指定者:
接口 PartSource 中的 createInputStream
返回:
the new input stream.
抛出:
java.io.IOException - If an IO problem occurs.
另请参见:
PartSource.createInputStream()