public class CryptoResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
STATUS_ERROR
Status for the result, finished with errors.
|
static int |
STATUS_IGNORED
Status for the result, file was ignored.
|
static int |
STATUS_OK
Status for the result, finished with success.
|
static int |
STATUS_UNKNOWN
Status for the initial object.
|
static int |
STATUS_WARNING
Status for the result, finished with warnings.
|
Constructor and Description |
---|
CryptoResult()
Constructor method for i18n purposes only.
|
CryptoResult(java.io.File source,
java.io.File target,
int format)
Constructor settings the initial values.
|
Modifier and Type | Method and Description |
---|---|
void |
displayFields()
Print some info about this object for debugging purposes.
|
boolean |
equals(CryptoResult tocheck)
Checks wether a given
CryptoResult instance is equal to this. |
java.lang.String |
getComment()
Getter for the optional comment like error messages.
|
com.didisoft.pgp.KeyPairInformation[] |
getCryptKeys()
Getter for the key(s) used for encryption/decryption.
|
int |
getDuration()
Getter for the time in milliseconds the operation took.
|
int |
getFormat()
Getter for the target file format.
|
java.io.File |
getSourceFile()
Getter for the source file.
|
int |
getStatus()
Getter for the operational status.
|
java.io.File |
getTargetFile()
Getter for the target file.
|
static java.lang.String |
mapFromStatus(int status)
Maps the given numerical status constant to the corresponding text representation.
|
void |
setComment(java.lang.String comment)
Setter for the optional comment like error messages.
|
void |
setCryptKeys(com.didisoft.pgp.KeyPairInformation[] keys)
Setter for the key(s) used for encryption/decryption.
|
void |
setDuration(int duration)
Setter for the time in milliseconds the operation took.
|
void |
setStatus(int status)
Setter for the operational status.
|
java.lang.String |
toString()
Overrides method
java.lang.Object.toString . |
public static final int STATUS_UNKNOWN
public static final int STATUS_OK
public static final int STATUS_WARNING
public static final int STATUS_ERROR
public static final int STATUS_IGNORED
public CryptoResult() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic CryptoResult(java.io.File source, java.io.File target, int format)
source
- The source file (required)target
- The target fileformat
- CryptoConstants.ENCRYPTION_FORMAT_PGP
|...java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic java.lang.String toString()
java.lang.Object.toString
.
toString
in class java.lang.Object
public boolean equals(CryptoResult tocheck)
CryptoResult
instance is equal to this.
tocheck
- The instance to be comparedCryptoResult
instance to check for equalitypublic java.io.File getSourceFile()
public java.io.File getTargetFile()
public int getFormat()
public int getDuration()
public int getStatus()
public java.lang.String getComment()
public com.didisoft.pgp.KeyPairInformation[] getCryptKeys()
public void setDuration(int duration)
duration
- The time in milliseconds, -1 unsetspublic void setStatus(int status)
status
- The statusjava.lang.IllegalArgumentException
- If a parameter is invalidpublic void setComment(java.lang.String comment)
comment
- The commentpublic void setCryptKeys(com.didisoft.pgp.KeyPairInformation[] keys)
keys
- The crypt keyspublic void displayFields()
public static java.lang.String mapFromStatus(int status)
status
- The status constantnull
if not a valid statusCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.