com.eruces.teagent.TEAgentFile
The TEAgentFile class encrypts and decrypts file data.
Inheritance
- Inherits com.eruces.teagent.TEAgent
- Inherits com.eruces.teagent.event.FileEventListener
- Inherits com.eruces.teagent.event.FileEventDispatcher
Static Public Attributes
| Type | Name | Description |
|---|---|---|
| final int | CHUNK_SIZE | The CHUNK_SIZE field establishes the size of a multi-byte data chunk. |
Public Member Functions
| Member | Description |
|---|---|
TEAgentFile() | The TEAgent constructor is the default constructor for the TEAgentFile class. |
TEAgentFile(File fp) | The TEAgentFile constructor specifies a file object. |
TEAgentFile(String strFileName) | The TEAgentFile constructor specifies a file name. |
void enableCompression(boolean bFlag) | The enableCompression method enables or disables file compression. |
boolean isCompressionEnabled() | The isCompressionEnabled method checks whether data compression has been enabled. |
void enableIntegrityCheck(boolean bCheck) | The enableIntegrityCheck method enables or disables the file integrity check. |
boolean isIntegrityCheckEnabled() | The isIntegrityCheckEnabled method checks whether the file integrity check has been enabled. |
void setChunkSize(int nSize) | The setChunkSize method sets the size of each multi-byte data chunk. |
int getChunkSize() | The getChunkSize method gets the size of each multi-byte data chunk. |
void setTemporaryPath(String strPath) | The setTemporaryPath method sets a file's temporary path. |
String getTemporaryPath() | The getTemporaryPath method gets a file temporary path. |
void setSourceFile(File file) | The setSourceFile method sets a source file to be encrypted or decrypted. |
void setDestinationFile(File file) | The setDestinationFile method sets a destination file for the encrypted or decrypted data. |
void setSourceFile(String strFileName) | The setSourceFile method sets a source file to be encrypted or decrypted. |
void setDestinationFile(String strFileName) | The setDestinationFile method sets a destination file for the encrypted or decrypted data. |
String getSourceFileName() | The getSourceFileName method gets the name of a source file. |
String getDestinationFileName() | The getDestinationFileName method gets the name of a destination file. |
void setHiddenLink(String strHL) | The setHiddenLink method sets a TTag. |
void setHiddenLink(byte[] hl) | The setHiddenLink method sets a TTag. |
String getHiddenLink() | The getHiddenLink method gets a TTag. |
String getHiddenLinkFromFile() | The getHiddenLinkFromFile method gets a TTag from an encrypted file Get hidden link from encrypted file. |
boolean isEncrypted() | The isEncrypted method checks whether a source file is encrypted. |
synchronized void encrypt() | The encrypt method encrypts a file. |
synchronized void decrypt() | The decrypt method decrypts a file. |
void enableChunk() | The enableChunk method enables the encryption and decryption of multi-byte data chunks. |
void disableChunk() | The disableChunk method disables multi-byte encryption and decryption. |
boolean isChunkEnabled() | The isChunkEnabled method checks whether multi-byte data encryption and decryption has been enabled. |
void startProcess(FileEvent e) | The startProcess method begins processing a specific start file event. |
void continueProcess(FileEvent e) | The continueProcess method continues processing a specific start file event. |
void finishProcess(FileEvent e) | The finishProcess method finishes processing a specific start file event. |
void cancelProcess(FileEvent e) | The cancelProcess method cancels processing a specific start file event. |
void addFileEventListener(FileEventListener fel) | The addFileEventListener method adds a file event listener. |
void removeFileEventListener(FileEventListener fel) | The removeFileEventListener method removes a file event listener. |
Member Function Documentation
TEAgentFile()
The TEAgent constructor is the default constructor for the TEAgentFile class.
TEAgentFile(File fp)
The TEAgentFile constructor specifies a file object.
Parameters
| Parameter | Description |
|---|---|
fp | A file object. |
TEAgentFile(String strFileName)
The TEAgentFile constructor specifies a file name.
Parameters
| Parameter | Description |
|---|---|
strFileName | A string representing a file name. |
void enableCompression(boolean bFlag)
The enableCompression method enables or disables file compression.
Parameters
| Parameter | Description |
|---|---|
bFlag | A boolean value indicating whether file compression has been enabled; True = file compression is enabled, False = file compression is disabled. |
boolean isCompressionEnabled()
The isCompressionEnabled method checks whether data compression has been enabled.
Returns: Returns a boolean value indicating whether file compression has been enabled; True = file compression is enabled, False = file compression is disabled.
void enableIntegrityCheck(boolean bCheck)
The enableIntegrityCheck method enables or disables the file integrity check.
Parameters
| Parameter | Description |
|---|---|
bCheck | a boolean value indicating whether the file integrity check has been enabled; True = file integrity check is enabled, False = file integrity check is disabled. |
boolean isIntegrityCheckEnabled()
The isIntegrityCheckEnabled method checks whether the file integrity check has been enabled.
Returns: Returns a boolean value indicating whether the file integrity check has been enabled; True = the file integrity check is enabled, False = the file integrity check is disabled.
void setChunkSize(int nSize)
The setChunkSize method sets the size of each multi-byte data chunk.
Parameters
| Parameter | Description |
|---|---|
nSize | An integer representing the size of a data chunk. |
int getChunkSize()
The getChunkSize method gets the size of each multi-byte data chunk.
Returns: Returns an integer representing the size of each chunk, in bytes.
void setTemporaryPath(String strPath)
The setTemporaryPath method sets a file's temporary path.
Parameters
| Parameter | Description |
|---|---|
strPath | A string representing a file's path. |
String getTemporaryPath()
The getTemporaryPath method gets a file temporary path.
Returns: Returns a string representing a file's temporary path.
void setSourceFile(File file)
The setSourceFile method sets a source file to be encrypted or decrypted.
Parameters
| Parameter | Description |
|---|---|
file | A file object. |
void setDestinationFile(File file)
The setDestinationFile method sets a destination file for the encrypted or decrypted data.
Parameters
| Parameter | Description |
|---|---|
file | A string representing the name of a destination file. |
void setSourceFile(String strFileName)
The setSourceFile method sets a source file to be encrypted or decrypted.
Parameters
| Parameter | Description |
|---|---|
strFileName | A string representing the file name. |
void setDestinationFile(String strFileName)
The setDestinationFile method sets a destination file for the encrypted or decrypted data.
Parameters
| Parameter | Description |
|---|---|
strFileName | A string representing the file name. |
String getSourceFileName()
The getSourceFileName method gets the name of a source file.
Returns: Returns a string representing the name of a source file.
String getDestinationFileName()
The getDestinationFileName method gets the name of a destination file.
Returns: Returns a string representing the name of a destination file.
void setHiddenLink(String strHL)
The setHiddenLink method sets a TTag.
Parameters
| Parameter | Description |
|---|---|
strHL | A string representing the TTag. |
void setHiddenLink(byte[] hl)
The setHiddenLink method sets a TTag.
Parameters
| Parameter | Description |
|---|---|
hl | A byte array representing several TTag. |
String getHiddenLink()
The getHiddenLink method gets a TTag.
Returns: Returns a string representing a TTag.
String getHiddenLinkFromFile()
The getHiddenLinkFromFile method gets a TTag from an encrypted file Get hidden link from encrypted file.
Returns: Returns a string representing a TTag. In the originating file is not encrypted, an exception will be thrown
boolean isEncrypted()
The isEncrypted method checks whether a source file is encrypted.
Returns: Returns a boolean value representing the status of a source file; True = the file is encrypted, False = the file is not encrypted.
synchronized void encrypt()
The encrypt method encrypts a file.
Remark: Overrides the encrypt method in the TEAgent class.
synchronized void decrypt()
The decrypt method decrypts a file.
Remark: Overrides the decrypt method in the TEAgent class.
void enableChunk()
The enableChunk method enables the encryption and decryption of multi-byte data chunks.
DeprecatedNot supported since ver 2.0
void disableChunk()
The disableChunk method disables multi-byte encryption and decryption.
DeprecatedNot supported since ver 2.0
boolean isChunkEnabled()
The isChunkEnabled method checks whether multi-byte data encryption and decryption has been enabled.
DeprecatedNot supported since Jun 24th, 2003
Returns: Returns a boolean value representing the status of data chunk-based cryptographic operations; True = chunk-based operations are enabled, False = chunk-based operations have been disabled.
void startProcess(FileEvent e)
The startProcess method begins processing a specific start file event.
Parameters
| Parameter | Description |
|---|---|
e | A start file event. |
Remark: Specified by the startProcess method in the FileEventListener interface.
void continueProcess(FileEvent e)
The continueProcess method continues processing a specific start file event.
Parameters
| Parameter | Description |
|---|---|
e | A continue file event. |
Remark: Specified by the continueProcess method in the FileEventListener interface.
void finishProcess(FileEvent e)
The finishProcess method finishes processing a specific start file event.
Parameters
| Parameter | Description |
|---|---|
e | A finish file event. |
Remark: Specified by the finishProcess method in the FileEventListener interface.
void cancelProcess(FileEvent e)
The cancelProcess method cancels processing a specific start file event.
Parameters
| Parameter | Description |
|---|---|
e | A cancel file event. |
Remark: Specified by the cancelProcess method in the FileEventListener interface.
void addFileEventListener(FileEventListener fel)
The addFileEventListener method adds a file event listener.
Parameters
| Parameter | Description |
|---|---|
fel | A file event listener to be added. |
Remark: Specified by the addFileEventListener method in the FileEventDispatcher interface.
void removeFileEventListener(FileEventListener fel)
The removeFileEventListener method removes a file event listener.
Parameters
| Parameter | Description |
|---|---|
fel | A file event listener to be removed. |
Remark: Specified by the removeFileEventListener method in the FileEventDispatcher interface.