org.walluck.oscar.handlers.filetransfer
Class FTTLV

java.lang.Object
  extended byorg.walluck.oscar.handlers.filetransfer.FTTLV

public class FTTLV
extends java.lang.Object

File transfer TLV.

Since:
1.0
Version:
1.0
Author:
David Walluck

Field Summary
static int SUBTYPE_GET_FILE
          Get a file.
static int SUBTYPE_GET_LIST
          Get a file/directory listing.
static int SUBTYPE_SEND_DIR
          Send a directory.
static int SUBTYPE_SEND_FILE
          Send a file.
 
Constructor Summary
FTTLV()
          Creates a new empty FT TLV.
FTTLV(int subtype, int numFiles, long totalSize, java.lang.String name)
          Creates a new FileTransfer TLV.
 
Method Summary
 int getCharset()
          Get the value of charset.
 int getCharSubset()
          Get the value of charSubset.
 java.lang.String getName()
          Get the value of name.
 int getNumFiles()
          Get the value of numFiles.
 int getSubtype()
          Get the value of subtype.
 long getTotalSize()
          Get the value of totalSize.
 int length()
          Return the length of this filetransfer TLV.
 void setCharset(int charset)
          Set the value of charset.
 void setCharSubset(int charSubset)
          Set the value of charSubset.
 void setName(java.lang.String name)
          Set the value of name.
 void setNumFiles(int numFiles)
          Set the value of numFiles.
 void setSubtype(int subtype)
          Set the value of subtype.
 void setTotalSize(long totalSize)
          Set the value of totalSize.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBTYPE_SEND_FILE

public static final int SUBTYPE_SEND_FILE
Send a file.

See Also:
Constant Field Values

SUBTYPE_SEND_DIR

public static final int SUBTYPE_SEND_DIR
Send a directory.

See Also:
Constant Field Values

SUBTYPE_GET_FILE

public static final int SUBTYPE_GET_FILE
Get a file.

See Also:
Constant Field Values

SUBTYPE_GET_LIST

public static final int SUBTYPE_GET_LIST
Get a file/directory listing.

See Also:
Constant Field Values
Constructor Detail

FTTLV

public FTTLV()
Creates a new empty FT TLV.


FTTLV

public FTTLV(int subtype,
             int numFiles,
             long totalSize,
             java.lang.String name)
Creates a new FileTransfer TLV.

Parameters:
subtype - the subtype
numFiles - the number of files
totalSize - the total size of the files
name - the file (or directory) name
Method Detail

getSubtype

public int getSubtype()
Get the value of subtype.

Returns:
value of subtype.

setSubtype

public void setSubtype(int subtype)
Set the value of subtype.

Parameters:
subtype - Value to assign to subtype.

getNumFiles

public int getNumFiles()
Get the value of numFiles.

Returns:
value of numFiles.

setNumFiles

public void setNumFiles(int numFiles)
Set the value of numFiles.

Parameters:
numFiles - Value to assign to numFiles.

getTotalSize

public long getTotalSize()
Get the value of totalSize.

Returns:
value of totalSize.

setTotalSize

public void setTotalSize(long totalSize)
Set the value of totalSize.

Parameters:
totalSize - Value to assign to totalSize.

getName

public java.lang.String getName()
Get the value of name.

Returns:
value of name.

setName

public void setName(java.lang.String name)
Set the value of name.

Parameters:
name - Value to assign to name.

getCharset

public int getCharset()
Get the value of charset.

Returns:
value of charset.

setCharset

public void setCharset(int charset)
Set the value of charset.

Parameters:
charset - Value to assign to charset.

getCharSubset

public int getCharSubset()
Get the value of charSubset.

Returns:
value of charSubset.

setCharSubset

public void setCharSubset(int charSubset)
Set the value of charSubset.

Parameters:
charSubset - Value to assign to charSubset.

length

public int length()
Return the length of this filetransfer TLV.

Returns:
the length