| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 part| Method Detail | 
|---|
public long getLength()
PartSource
getLength in interface PartSourcePartSource.getLength()public String getFileName()
PartSource
getFileName in interface PartSourcePartSource.getFileName()
public InputStream createInputStream()
                              throws IOException
PartSource
createInputStream in interface PartSourceIOException - 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 | |||||||||