| java.lang.Object java.util.EventObject org.apache.commons.net.io.CopyStreamEvent
CopyStreamEvent | public class CopyStreamEvent extends EventObject (Code) | | A CopyStreamEvent is triggered after every write performed by a
stream copying operation. The event stores the number of bytes
transferred by the write triggering the event as well as the total
number of bytes transferred so far by the copy operation.
See Also: CopyStreamListener See Also: CopyStreamAdapter See Also: Util author: Daniel F. Savarese version: $Id: CopyStreamEvent.java 165675 2005-05-02 20:09:55Z rwinston $ |
Field Summary | |
final public static long | UNKNOWN_STREAM_SIZE Constant used to indicate the stream size is unknown. |
Constructor Summary | |
public | CopyStreamEvent(Object source, long totalBytesTransferred, int bytesTransferred, long streamSize) Creates a new CopyStreamEvent instance. |
Method Summary | |
public int | getBytesTransferred() Returns the number of bytes transferred by the write that triggered
the event. | public long | getStreamSize() Returns the size of the stream being copied. | public long | getTotalBytesTransferred() Returns the total number of bytes transferred so far by the copy
operation. |
UNKNOWN_STREAM_SIZE | final public static long UNKNOWN_STREAM_SIZE(Code) | | Constant used to indicate the stream size is unknown.
|
CopyStreamEvent | public CopyStreamEvent(Object source, long totalBytesTransferred, int bytesTransferred, long streamSize)(Code) | | Creates a new CopyStreamEvent instance.
Parameters: source - The source of the event. Parameters: totalBytesTransferred - The total number of bytes transferred sofar during a copy operation. Parameters: bytesTransferred - The number of bytes transferred during thewrite that triggered the CopyStreamEvent. Parameters: streamSize - The number of bytes in the stream being copied.This may be set to UNKNOWN_STREAM_SIZE if thesize is unknown. |
getBytesTransferred | public int getBytesTransferred()(Code) | | Returns the number of bytes transferred by the write that triggered
the event.
The number of bytes transferred by the write that triggeredthe vent. |
getStreamSize | public long getStreamSize()(Code) | | Returns the size of the stream being copied.
This may be set to UNKNOWN_STREAM_SIZE if the
size is unknown.
The size of the stream being copied. |
getTotalBytesTransferred | public long getTotalBytesTransferred()(Code) | | Returns the total number of bytes transferred so far by the copy
operation.
The total number of bytes transferred so far by the copyoperation. |
|
|