Class CMSTimeStampedDataGenerator

    • Constructor Detail

      • CMSTimeStampedDataGenerator

        public CMSTimeStampedDataGenerator()
    • Method Detail

      • generate

        public CMSTimeStampedData generate​(TimeStampToken timeStamp)
                                    throws CMSException
        Generate a TimeStampedData with no encapsulated content (e.g. when the document is referenced via a dataUri).
        Parameters:
        timeStamp - the initial time stamp token.
        Returns:
        the generated CMSTimeStampedData.
        Throws:
        CMSException - if the structure cannot be built.
      • generate

        public CMSTimeStampedData generate​(TimeStampToken timeStamp,
                                           byte[] content)
                                    throws CMSException
        Generate a TimeStampedData encapsulating the passed in content.
        Parameters:
        timeStamp - the initial time stamp token.
        content - the document content to encapsulate.
        Returns:
        the generated CMSTimeStampedData.
        Throws:
        CMSException - if the structure cannot be built.
      • generate

        public CMSTimeStampedData generate​(TimeStampToken timeStamp,
                                           java.io.InputStream content)
                                    throws CMSException
        Generate a TimeStampedData encapsulating the content drained from the passed in stream.
        Parameters:
        timeStamp - the initial time stamp token.
        content - a stream over the document content to encapsulate, or null for none.
        Returns:
        the generated CMSTimeStampedData.
        Throws:
        CMSException - if the content cannot be read or the structure cannot be built.