public class FileTransfer extends Object implements Externalizable
Constructor and Description |
---|
FileTransfer()
The noarg constructore is used for deserializing.
|
FileTransfer(byte[] buffer,
int offset,
int length,
String dest)
Creates a file transfer object from a byte buffer.
|
FileTransfer(String src,
String dest)
Creates a file transfer object.
|
Modifier and Type | Method and Description |
---|---|
String |
getDest()
Obtains the destination file name.
|
long |
getSize()
Obtains the size of the file transferred, or 0 if the file transfer
has not yet happen.
|
String |
getSource()
Obtains the sources file name.
|
long |
getTransferSize()
Obtains the size to be transferred on the sending side, or the size
really transferred on the receiving side.
|
void |
readExternal(ObjectInput in) |
void |
writeExternal(ObjectOutput out) |
public FileTransfer(String src, String dest) throws IOException
src
- The source file namedest
- The destination file nameIOException
- Error reading the file to be transferredpublic FileTransfer(byte[] buffer, int offset, int length, String dest)
buffer
- The bufferoffset
- The starting offset to uselength
- The length of data to use, in bytesdest
- The destination filepublic FileTransfer()
public String getSource()
public String getDest()
public long getSize()
public long getTransferSize()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException