Class PGPLiteralDataGenerator


  • public class PGPLiteralDataGenerator
    extends java.lang.Object
    Generator for producing literal data packets.

    A PGPLiteralData 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 data to be written is known in advance, use open(OutputStream, char, String, long, 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 PGPLiteralDataGenerator 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.