Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Constructor Summary
`BinaryHelper()`

Method Summary
`static String` | `createChecksum(InputStream is)` Creates a checksum for a given InputStream.
`static String` | `getChecksum(MessageDigest digest)` Takes a populated `MessageDigest` and returns the HEX representation of the CheckSum.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BinaryHelper

    public BinaryHelper()

Method Detail

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved