Class DataGroup


  • public class DataGroup
    extends java.lang.Object
    Representation of data groups according to the description provided in RFC4998.

    Such data groups represent a set of one or more data objects (e.g. electronic documents) for which an Evidence Record should be generated.

    • Constructor Summary

      Constructors 
      Constructor Description
      DataGroup​(byte[] dataObject)  
      DataGroup​(java.util.List<byte[]> dataObjects)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getHash​(DigestCalculator digestCalculator)
      Generates a hash for the whole DataGroup.
      java.util.TreeSet<byte[]> getHashes​(DigestCalculator digestCalculator)
      Generates hashes for all the data objects included in the data group.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataGroup

        public DataGroup​(java.util.List<byte[]> dataObjects)
      • DataGroup

        public DataGroup​(byte[] dataObject)
    • Method Detail

      • getHashes

        public java.util.TreeSet<byte[]> getHashes​(DigestCalculator digestCalculator)
        Generates hashes for all the data objects included in the data group.
        Parameters:
        digestCalculator - the DigestCalculator to use for computing the hashes
        Returns:
        the set of hashes, in ascending order
      • getHash

        public byte[] getHash​(DigestCalculator digestCalculator)
        Generates a hash for the whole DataGroup.
        Parameters:
        digestCalculator - the DigestCalculator to use for computing the hash
        Returns:
        a hash that is representative of the whole DataGroup