org.apache.commons.httpclient.methods.multipart

Class ByteArrayPartSource

public class ByteArrayPartSource extends Object implements PartSource

A PartSource that reads from a byte array. This class should be used when the data to post is already loaded into memory.

Since: 2.0

Author: Michael Becke

Constructor Summary
ByteArrayPartSource(String fileName, byte[] bytes)
Constructor for ByteArrayPartSource.
Method Summary
InputStreamcreateInputStream()
StringgetFileName()
longgetLength()

Constructor Detail

ByteArrayPartSource

public ByteArrayPartSource(String fileName, byte[] bytes)
Constructor for ByteArrayPartSource.

Parameters: fileName the name of the file these bytes represent bytes the content of this part

Method Detail

createInputStream

public InputStream createInputStream()

See Also: createInputStream

getFileName

public String getFileName()

See Also: getFileName

getLength

public long getLength()

See Also: getLength

Copyright (c) 1999-2005 - Apache Software Foundation