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
WLP 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 © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.