|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.util.MD5Sum
Encode an MD5 digest into a String.
The 128 bit MD5 hash is converted into a 32 character long String. Each character of the String is the hexadecimal representation of 4 bits of the digest. XXX The API here is a mess. It is combining a static utility class with a message digest API. Some methods which should be static are not, presumably so Jelly can easily access them.
Constructor Summary | |
MD5Sum()
|
Method Summary | |
java.lang.String |
encode(byte[] binaryData)
Encodes the 128 bit (16 bytes) MD5 into a 32 character String. |
void |
execute()
Perform the MD5-Sum work. |
byte[] |
getBytes(java.io.File file)
Pull in static content and store it |
java.lang.String |
getChecksum()
Get the checksum |
java.io.File |
getFile()
Get the file that the checksum will be perform on. |
void |
setChecksum(java.lang.String checksum)
Set the checksum |
void |
setFile(java.io.File file)
Set the file to perform the checksum on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MD5Sum()
Method Detail |
public void setFile(java.io.File file)
file
- The file.public java.io.File getFile()
public void setChecksum(java.lang.String checksum)
checksum
- The checksum.public java.lang.String getChecksum()
public java.lang.String encode(byte[] binaryData)
binaryData
- Array containing the digest
public byte[] getBytes(java.io.File file) throws java.lang.Exception
file
- The file to read.
java.lang.Exception
- If an error occurs reading in the file's bytes.public void execute() throws java.lang.Exception
java.lang.Exception
- If an error occurs while calculating the sum.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |