public class DigestResult
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_INVALID
Status for the result, digest did not match.
|
static int |
STATUS_OK
Status for the result, finished with success.
|
static int |
STATUS_VALID
Status for the result, digest matched.
|
static int |
STATUS_WARNING
Status for the result, finished with warnings (e.g.
|
static java.lang.String |
TYPE_PGP_SIGNATURE
The type representing PGP signatures.
|
Constructor and Description |
---|
DigestResult()
Constructor method for i18n purposes only.
|
DigestResult(java.io.File targetfile,
org.apache.commons.vfs2.FileObject targeturl,
java.lang.String algorithm,
byte[] rawDigest,
java.lang.String hexDigest,
long duration,
int status,
java.lang.String comment,
java.util.Vector<IntermediateDigest> intermediates,
long xmllength,
long xmlmodified)
Constructor settings the initial values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(DigestResult tocheck)
Checks wether a given
GenerateDigestResult instance is equal to this. |
protected void |
finalize()
Clean-up method to help the gc.
|
java.lang.String |
getAlgorithm()
Getter for the used algorithm identifier.
|
java.lang.String |
getComment()
Getter for comment.
|
long |
getDuration()
Getter for duration.
|
java.lang.String |
getHexDigest()
Getter for hex digest.
|
java.util.Vector<IntermediateDigest> |
getIntermediates()
Getter for intermediate digests.
|
java.lang.String |
getPGPSignKeyURL()
Getter for sign key URL (PGP signatures).
|
java.lang.String |
getPGPSignKeyUserID()
Getter for sign key user ID (PGP signatures).
|
byte[] |
getRawDigest()
Getter for raw digest.
|
int |
getStatus()
Getter for status.
|
java.io.File |
getTargetFile()
Getter for file target.
|
org.apache.commons.vfs2.FileObject |
getTargetURL()
Getter for URL target.
|
int |
getTrust()
Getter for trust (refresh/sync).
|
long |
getXMLLength()
Getter for target "length".
|
long |
getXMLModified()
Getter for target "modified".
|
boolean |
isPGPSignature()
Convenience to determine if this result represents a PGP signature.
|
void |
setComment(java.lang.String comment)
Setter for comment.
|
void |
setDuration(long duration)
Setter for duration.
|
void |
setHexDigest(java.lang.String hexDigest)
Setter for hex digest.
|
void |
setIntermediates(java.util.Vector<IntermediateDigest> intermediates)
Setter for comment.
|
void |
setPGPSignKeyURL(java.lang.String url)
Setter for sign key URL (PGP signatures).
|
void |
setPGPSignKeyUserID(java.lang.String signkey)
Setter for sign key user ID (PGP signatures).
|
void |
setRawDigest(byte[] rawDigest)
Setter for raw digest.
|
void |
setStatus(int status)
Setter for status.
|
void |
setTargetFile(java.io.File file)
Setter for file target.
|
void |
setTrust(int trust)
Setter for trust (refresh/sync).
|
void |
setXMLLength(long length)
Setter for target "length".
|
void |
setXMLModified(long modified)
Setter for target "modified".
|
java.lang.String |
toString()
Overrides method
java.lang.Object.toString . |
public static final int STATUS_OK
public static final int STATUS_ERROR
public static final int STATUS_IGNORED
public static final int STATUS_VALID
public static final int STATUS_INVALID
public static final int STATUS_WARNING
public static final java.lang.String TYPE_PGP_SIGNATURE
public DigestResult() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic DigestResult(java.io.File targetfile, org.apache.commons.vfs2.FileObject targeturl, java.lang.String algorithm, byte[] rawDigest, java.lang.String hexDigest, long duration, int status, java.lang.String comment, java.util.Vector<IntermediateDigest> intermediates, long xmllength, long xmlmodified)
targetfile
- The file to calculate the digest for (optional)targeturl
- The URL to calculate the digest for (optional)algorithm
- The digest algorithm like "MD5", "PGPSIG" for signatures (required)rawDigest
- The calculated raw digest, null
if an error occurredhexDigest
- The calculated hex digest, null
if an error occurredduration
- Period of time in milliseconds the calculation took (required)status
- Status of generation (required)comment
- Optional comment like error messagesintermediates
- Optional intermediate digests for faster error detectionxmllength
- The target "length" attribute (XML only), -1 otherwise.xmlmodified
- The target "modified" attribute (XML only), -1 otherwisejava.lang.IllegalArgumentException
- If at least one of the parameters is invalidprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- Error indicationpublic java.lang.String toString()
java.lang.Object.toString
.
toString
in class java.lang.Object
public boolean equals(DigestResult tocheck)
GenerateDigestResult
instance is equal to this.
tocheck
- The instance to be comparedGenerateDigestResult
instance to check for equalitypublic java.io.File getTargetFile()
public void setTargetFile(java.io.File file)
GenerateResultsTab
to be displayed.
file
- The targetpublic org.apache.commons.vfs2.FileObject getTargetURL()
public java.lang.String getAlgorithm()
public byte[] getRawDigest()
public void setRawDigest(byte[] rawDigest)
rawDigest
- The raw digestpublic java.lang.String getHexDigest()
public void setHexDigest(java.lang.String hexDigest)
hexDigest
- The hex digestpublic long getDuration()
public void setDuration(long duration)
duration
- The durationpublic int getStatus()
public void setStatus(int status)
status
- The statuspublic java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The commentpublic java.util.Vector<IntermediateDigest> getIntermediates()
public void setIntermediates(java.util.Vector<IntermediateDigest> intermediates)
intermediates
- The commentpublic int getTrust()
public void setTrust(int trust)
trust
- The trust value, -1 means not checkedpublic long getXMLLength()
public void setXMLLength(long length)
length
- The target "length" attribute (XML only), -1 otherwisepublic long getXMLModified()
public void setXMLModified(long modified)
modified
- The target "modified" attribute (XML only), -1 otherwisepublic java.lang.String getPGPSignKeyUserID()
null
if not availablepublic void setPGPSignKeyUserID(java.lang.String signkey)
signkey
- The key user ID, null
if not availablepublic java.lang.String getPGPSignKeyURL()
null
if not availablepublic void setPGPSignKeyURL(java.lang.String url)
url
- The key URL, null
if not availablepublic boolean isPGPSignature()
Copyright © 2005-2015 Leisenfels UG. All rights reserved.