|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFileSendBlock
A data structure containing information about a file or directory of files being sent in a file transfer request.
| Field Summary | |
static int |
SENDTYPE_DIR
A code indicating that all of the files in a directory are being sent. |
static int |
SENDTYPE_SINGLEFILE
A code indicating that a single file is being sent. |
| Constructor Summary | |
FileSendBlock(int sendType,
java.lang.String filename,
int fileCount,
long totalFileSize)
Creates a new outgoing file send block with the given properties. |
|
FileSendBlock(java.lang.String filename,
long size)
Creates a file send block describing a single file with the given size. |
|
| Method Summary | |
int |
getFileCount()
Returns the total number of files being sent. |
java.lang.String |
getFilename()
Returns the name of the file being sent. |
int |
getSendType()
Returns the "send type" code for this transfer. |
long |
getTotalFileSize()
Returns the total cumulative file size, in bytes, of all files being sent. |
static FileSendBlock |
readFileSendBlock(ByteBlock block)
Creates a new file send block object from the given incoming block of binary data. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SENDTYPE_SINGLEFILE
public static final int SENDTYPE_DIR
| Constructor Detail |
public FileSendBlock(java.lang.String filename,
long size)
SENDTYPE_SINGLEFILE and a file count of 1.
new FileSendBlock(SENDTYPE_SINGLEFILE, filename, 1,
size).
filename - the name of the file being sentsize - the size of the file being sent
public FileSendBlock(int sendType,
java.lang.String filename,
int fileCount,
long totalFileSize)
dirName,
WinAIM sends "dirName\*" as the value of
filename.
sendType - a "send type" code, like SENDTYPE_SINGLEFILEfilename - the name of the file or directory being sentfileCount - the number of files being sent (not including the base
directory itself, if sending an entire directory)totalFileSize - the total cumulative file size of all of the files
being sent| Method Detail |
public static FileSendBlock readFileSendBlock(ByteBlock block)
block - a block of binary data containing a file send block
public final int getSendType()
SENDTYPE_SINGLEFILE or SENDTYPE_DIR.
public final int getFileCount()
public final long getTotalFileSize()
public final java.lang.String getFilename()
"directoryName\*" as the filename, indicating that the
transferred files should be placed in a new directory called
directoryName.
public void write(java.io.OutputStream out)
throws java.io.IOException
LiveWritable
write in interface LiveWritableout - the stream to which to write
java.io.IOException - if an I/O error occurspublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||