com.bea.content
Class BinaryHelper
java.lang.Object
com.bea.content.BinaryHelper
public class BinaryHelper
- extends Object
A helper class for dealing with binary data. This class is used to compute the checksum value stored in the BEA
Repository.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryHelper
public BinaryHelper()
createChecksum
public static String createChecksum(InputStream is)
throws RepositoryException
- Creates a checksum for a given InputStream. The checksum is generated using a
MessageDigest
with the MD5
algorithm. Note: This method will consume the InputStream
.
- Parameters
is
- a non-null InputStream
- Returns
- a
String
containing the checksum
- Throws
RepositoryException
- if an error occurs during the computation.
getChecksum
public static String getChecksum(MessageDigest digest)
- Takes a populated
MessageDigest
and returns the HEX representation of the CheckSum.
- Parameters
digest
- The digest.
- Returns
- The checksum.
Copyright © 2006 BEA Systems, Inc. All Rights Reserved