|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.httpclient.methods.multipart.ByteArrayPartSource
public class ByteArrayPartSource
A PartSource that reads from a byte array. This class should be used when the data to post is already loaded into memory.
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()
PartSource
createInputStream
in interface PartSource
PartSource.createInputStream()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |