|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ning.http.multipart.ByteArrayPartSource
public class ByteArrayPartSource
This class is an adaptation of the Apache HttpClient implementation
Constructor Summary | |
---|---|
ByteArrayPartSource(String fileName,
byte[] bytes)
Constructor for ByteArrayPartSource. |
Method Summary | |
---|---|
InputStream |
createInputStream()
Gets a new InputStream for reading this source. |
String |
getFileName()
Gets the name of the file this source represents. |
long |
getLength()
Gets the number of bytes contained in this source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayPartSource(String fileName, byte[] bytes)
fileName
- the name of the file these bytes representbytes
- the content of this partMethod Detail |
---|
public long getLength()
PartSource
getLength
in interface PartSource
PartSource.getLength()
public String getFileName()
PartSource
getFileName
in interface PartSource
PartSource.getFileName()
public InputStream createInputStream() throws IOException
PartSource
createInputStream
in interface PartSource
IOException
- if an error occurs when creating the InputStreamPartSource.createInputStream()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |