im.yixin.sdk.http.multipart
接口 PartSource

所有已知实现类:
ByteArrayPartSource, FilePartSource

public interface PartSource

An interface for providing access to data when posting MultiPart messages.

从以下版本开始:
2.0
另请参见:
FilePart

方法摘要
 java.io.InputStream createInputStream()
          Gets a new InputStream for reading this source.
 java.lang.String getFileName()
          Gets the name of the file this source represents.
 long getLength()
          Gets the number of bytes contained in this source.
 

方法详细信息

getLength

long getLength()
Gets the number of bytes contained in this source.

返回:
a value >= 0

getFileName

java.lang.String getFileName()
Gets the name of the file this source represents.

返回:
the fileName used for posting a MultiPart file part

createInputStream

java.io.InputStream createInputStream()
                                      throws java.io.IOException
Gets a new InputStream for reading this source. This method can be called more than once and should therefore return a new stream every time.

返回:
a new InputStream
抛出:
java.io.IOException - if an error occurs when creating the InputStream