Class PGPCanonicalizedDataGenerator


  • public class PGPCanonicalizedDataGenerator
    extends java.lang.Object
    Generator for producing filtered literal data packets which are automatically canonicalized.

    PGPCanonicalizedDataGenerator is used by invoking one of the open functions to create an OutputStream that raw data can be supplied to for encoding:

    If the length of the originating data to be written is known in advance, use open(OutputStream, char, String, Date) to create a packet containing a single literal data object.
  • If the length of the data is unknown, use open(OutputStream, char, String, Date, byte[]) to create a packet consisting of a series of literal data objects (partials).

A PGPCanonicalizedDataGenerator is usually used to wrap the OutputStream obtained from a PGPEncryptedDataGenerator or a PGPCompressedDataGenerator.

Once literal data has been written to the constructed OutputStream, writing of the object stream is completed by closing the OutputStream obtained from the open() method, or equivalently invoking close() on this generator.