org.apache.commons.httpclient.methods.multipart

Interface PartSource

public interface PartSource

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

Since: 2.0

Author: Michael Becke

See Also:

Method Summary
InputStreamcreateInputStream()
Gets a new InputStream for reading this source.
StringgetFileName()
Gets the name of the file this source represents.
longgetLength()
Gets the number of bytes contained in this source.

Method Detail

createInputStream

public InputStream createInputStream()
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.

Returns: a new InputStream

Throws: IOException if an error occurs when creating the InputStream

getFileName

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

Returns: the fileName used for posting a MultiPart file part

getLength

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

Returns: a value >= 0

Copyright (c) 1999-2005 - Apache Software Foundation