public class FileHeader extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FH_TYPE_FILE_DATA
File data.
|
static int |
FH_TYPE_FILE_OK_TO_RESUME
OK to resume file.
|
static int |
FH_TYPE_FILE_OK_TO_SEND
OK to send file.
|
static int |
FH_TYPE_FILE_REQUEST
Request file.
|
static int |
FH_TYPE_FILE_TO_RESUME
File to resume.
|
static int |
FH_TYPE_FILE_TO_SEND
File to send.
|
static int |
FH_TYPE_FILE_WANT_TO_RESUME
Want resume.
|
static int |
FH_TYPE_FOOTER
File footer.
|
static int |
FH_TYPE_LIST_DATA
List data.
|
static int |
FH_TYPE_LIST_FOOTER
List footer.
|
static int |
FH_TYPE_LIST_OK_TO_SEND
OK to send list.
|
static int |
FH_TYPE_LIST_REQUEST
Request directory listing.
|
static int |
FH_TYPE_LIST_TO_SEND
List to send.
|
static byte |
FLAG_DEFAULT
The default flag sent by WinAIM.
|
static byte |
FLAG_DONE
The done flag.
|
static byte |
FLAG_FILE_LIST
The file list flag.
|
Constructor and Description |
---|
FileHeader() |
Modifier and Type | Method and Description |
---|---|
int |
getCharset()
Get the value of charset.
|
int |
getCharSubset()
Get the value of charSubset.
|
long |
getChecksum()
Get the value of checksum.
|
int |
getCompression()
Get the value of compression.
|
byte[] |
getCookie()
Get the value of cookie.
|
byte[] |
getDummyBlock()
Get the value of dummyBlock.
|
int |
getEncryption()
Get the value of encryption.
|
long |
getFileSize()
Get the value of fileSize.
|
long |
getFileTime()
Get the value of fileTime.
|
byte |
getFlag()
Get the value of flag.
|
String |
getIDString()
Get the value of id.
|
int |
getLength()
Get the value of length.
|
byte |
getListNameOffset()
Get the value of listNameOffset.
|
byte |
getListSizeOffset()
Get the value of listSizeOffset.
|
byte[] |
getMacFileInfo()
Get the value of macFileInfo.
|
String |
getMagic()
Get the value of magic.
|
String |
getName()
Get the value of name.
|
int |
getNumFilesLeft()
Get the value of numFilesLeft.
|
int |
getNumPartsLeft()
Get the value of numPartsLeft.
|
long |
getNumRecvd()
Get the value of numRecvd.
|
long |
getRecvdChecksum()
Get the value of recvdChecksum.
|
long |
getResChecksum()
Get the value of resChecksum.
|
long |
getResRecvdChecksum()
Get the value of resRecvdChecksum.
|
long |
getResSize()
Get the value of resSize.
|
long |
getResTime()
Get the value of resTime.
|
long |
getTotalFileSize()
Get the value of totalFileSize.
|
int |
getTotalNumFiles()
Get the value of totalNumFiles.
|
int |
getTotalNumParts()
Get the value of totalNumParts.
|
int |
getType()
Get the value of type.
|
void |
setCharset(int charset)
Set the value of charset.
|
void |
setCharSubset(int charSubset)
Set the value of charsubset.
|
void |
setChecksum(long checksum)
Set the value of checksum.
|
void |
setComm(int length,
int type)
Set attributes common to both send file and receive file.
|
void |
setCompression(int compression)
Set the value of compression.
|
void |
setCookie(byte[] cookie)
Set the value of cookie.
|
void |
setDummyBlock(byte[] dummyBlock)
Set the value of dummyBlock.
|
void |
setEncryption(int encryption)
Set the value of encryption.
|
void |
setFileSize(long fileSize)
Set the value of fileSize.
|
void |
setFileTime(long fileTime)
Set the value of fileTime.
|
void |
setFlag(byte flag)
Set the value of flag.
|
void |
setIDString(String id)
Set the value of id.
|
void |
setLength(int length)
Set the value of length.
|
void |
setListNameOffset(byte listNameOffset)
Set the value of listNameOffset.
|
void |
setListSizeOffset(byte listSizeOffset)
Set the value of listSizeOffset.
|
void |
setMacFileInfo(byte[] macFileInfo)
Set the value of macFileInfo.
|
void |
setMagic(String magic)
Set the value of magic.
|
void |
setName(String name)
Set the value of name.
|
void |
setNumFilesLeft(int numFilesLeft)
Set the value of numFilesLeft.
|
void |
setNumPartsLeft(int numPartsLeft)
Set the value of numPartsLeft.
|
void |
setNumRecvd(long numRecvd)
Set the value of numRecvd.
|
void |
setRecv(long numRecvd,
long recvdChecksum)
Set the receive file attributes.
|
void |
setRecvdChecksum(long recvdChecksum)
Set the value of recvdChecksum.
|
void |
setRes(long resSize,
long resTime,
long resChecksum)
Set resource fork (Macintosh) attributes.
|
void |
setResChecksum(long resChecksum)
Set the value of resChecksum.
|
void |
setResRecvdChecksum(long resRecvdChecksum)
Set the value of resRecvdChecksum.
|
void |
setResSize(long resSize)
Set the value of resSize.
|
void |
setResTime(long resTime)
Set the value of resTime.
|
void |
setSend(int totalNumFiles,
int numFilesLeft,
int totalNumParts,
int numPartsLeft,
long totalFileSize,
long fileSize,
long fileTime,
long checksum,
String name)
Set the send file attributes.
|
void |
setTotalFileSize(long totalFileSize)
Set the value of totalFileSize.
|
void |
setTotalNumFiles(int totalNumFiles)
Set the value of totalNumFiles.
|
void |
setTotalNumParts(int totalNumParts)
Set the value of totalNumParts.
|
void |
setType(int type)
Set the value of type.
|
public static final byte FLAG_DEFAULT
public static final byte FLAG_DONE
public static final byte FLAG_FILE_LIST
public static final int FH_TYPE_FILE_DATA
public static final int FH_TYPE_FILE_TO_SEND
public static final int FH_TYPE_FILE_TO_RESUME
public static final int FH_TYPE_FILE_OK_TO_SEND
public static final int FH_TYPE_FOOTER
public static final int FH_TYPE_FILE_WANT_TO_RESUME
public static final int FH_TYPE_FILE_OK_TO_RESUME
public static final int FH_TYPE_LIST_DATA
public static final int FH_TYPE_LIST_TO_SEND
public static final int FH_TYPE_LIST_OK_TO_SEND
public static final int FH_TYPE_LIST_FOOTER
public static final int FH_TYPE_FILE_REQUEST
public static final int FH_TYPE_LIST_REQUEST
public void setSend(int totalNumFiles, int numFilesLeft, int totalNumParts, int numPartsLeft, long totalFileSize, long fileSize, long fileTime, long checksum, String name)
totalNumFiles
- total number of filesnumFilesLeft
- number of files left to sendtotalNumParts
- total partsnumPartsLeft
- total parts lefttotalFileSize
- total file sizefileSize
- file sizefileTime
- file timechecksum
- file checksumname
- file namepublic void setRecv(long numRecvd, long recvdChecksum)
numRecvd
- number of files receivedrecvdChecksum
- checksum of the received filepublic void setComm(int length, int type)
length
- the file header lengthtype
- the file header typepublic void setRes(long resSize, long resTime, long resChecksum)
resSize
- resource fork sizeresTime
- resource fork timestampresChecksum
- resource fork checksumpublic String getMagic()
public void setMagic(String magic)
magic
- Value to assign to magic.public int getLength()
public void setLength(int length)
length
- Value to assign to length.public int getType()
public void setType(int type)
type
- Value to assign to type.public byte[] getCookie()
public void setCookie(byte[] cookie)
cookie
- Value to assign to cookie.public int getEncryption()
public void setEncryption(int encryption)
encryption
- Value to assign to encryption.public int getCompression()
public void setCompression(int compression)
compression
- Value to assign to compression.public int getTotalNumFiles()
public void setTotalNumFiles(int totalNumFiles)
totalNumFiles
- Value to assign to totalNumFiles.public int getNumFilesLeft()
public void setNumFilesLeft(int numFilesLeft)
numFilesLeft
- Value to assign to numFilesLeft.public int getTotalNumParts()
public void setTotalNumParts(int totalNumParts)
totalNumParts
- Value to assign to totalNumParts.public int getNumPartsLeft()
public void setNumPartsLeft(int numPartsLeft)
numPartsLeft
- Value to assign to numPartsLeft.public long getTotalFileSize()
public void setTotalFileSize(long totalFileSize)
totalFileSize
- Value to assign to totalFileSize.public long getFileSize()
public void setFileSize(long fileSize)
fileSize
- Value to assign to fileSize.public long getFileTime()
public void setFileTime(long fileTime)
fileTime
- Value to assign to fileTime.public long getChecksum()
public void setChecksum(long checksum)
checksum
- Value to assign to checksum.public long getResRecvdChecksum()
public void setResRecvdChecksum(long resRecvdChecksum)
resRecvdChecksum
- Value to assign to resRecvdChecksum.public long getResSize()
public void setResSize(long resSize)
resSize
- Value to assign to resSize.public long getResTime()
public void setResTime(long resTime)
resTime
- Value to assign to resTime.public long getResChecksum()
public void setResChecksum(long resChecksum)
resChecksum
- Value to assign to resChecksum.public long getNumRecvd()
public void setNumRecvd(long numRecvd)
numRecvd
- Value to assign to numRecvd.public long getRecvdChecksum()
public void setRecvdChecksum(long recvdChecksum)
recvdChecksum
- Value to assign to recvdChecksum.public String getIDString()
public void setIDString(String id)
id
- Value to assign to id.public byte getFlag()
public void setFlag(byte flag)
flag
- Value to assign to flag.public byte getListNameOffset()
public void setListNameOffset(byte listNameOffset)
listNameOffset
- Value to assign to listNameOffset.public byte getListSizeOffset()
public void setListSizeOffset(byte listSizeOffset)
listSizeOffset
- Value to assign to listSizeOffset.public byte[] getDummyBlock()
public void setDummyBlock(byte[] dummyBlock)
dummyBlock
- Value to assign to dummyBlock.public byte[] getMacFileInfo()
public void setMacFileInfo(byte[] macFileInfo)
macFileInfo
- Value to assign to macFileInfo.public int getCharset()
public void setCharset(int charset)
charset
- Value to assign to charset.public int getCharSubset()
public void setCharSubset(int charSubset)
charSubset
- Value to assign to charsubset.public String getName()
public void setName(String name)
name
- Value to assign to name.