|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.fileutil.FileTransferEvent
public class FileTransferEvent
Transfer event containing information useful for monitoring file transfer progress.
Nested Class Summary | |
---|---|
static class |
FileTransferEvent.Type
Event types |
Constructor Summary | |
---|---|
FileTransferEvent(org.apache.commons.vfs2.FileObject source,
org.apache.commons.vfs2.FileObject dest,
FileTransferEvent.Type type,
long sourceSize,
long destSize,
long destTime,
java.lang.String displayName)
Constructor, sets properties of event and automatically computes the event's time from the system clock. |
Method Summary | |
---|---|
org.apache.commons.vfs2.FileObject |
getDestinationFile()
|
long |
getDestinationSize()
|
java.lang.String |
getDisplayName()
Returns the display name. |
long |
getEventTime()
Returns the system time in milliseconds that the event was created. |
double |
getProgress()
Fractional progress, -1 if cannot be determined |
org.apache.commons.vfs2.FileObject |
getSourceFile()
|
long |
getSourceSize()
|
long |
getTransferTime()
|
FileTransferEvent.Type |
getType()
|
void |
notify(FileTransferListener listener)
Fires the event to all listeners |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTransferEvent(org.apache.commons.vfs2.FileObject source, org.apache.commons.vfs2.FileObject dest, FileTransferEvent.Type type, long sourceSize, long destSize, long destTime, java.lang.String displayName)
source
- The source filedest
- Transfer destinationtype
- Type of eventsourceSize
- Size of file to transferdestSize
- Current size of the destination filedestTime
- Current timestamp on the destination filedisplayName
- Can be used to display file, for example in case
an intermediary file is used such as file.txt.part, you may want
to display file.txt instead.Method Detail |
---|
public void notify(FileTransferListener listener)
listener
- public org.apache.commons.vfs2.FileObject getSourceFile()
public org.apache.commons.vfs2.FileObject getDestinationFile()
public FileTransferEvent.Type getType()
public long getDestinationSize()
public long getSourceSize()
public long getTransferTime()
public double getProgress()
public long getEventTime()
public java.lang.String getDisplayName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |