Class PGPCompressedData

    • Constructor Detail

      • PGPCompressedData

        public PGPCompressedData​(BCPGInputStream pIn)
                          throws java.io.IOException
        Construct a compressed data object, reading a single PacketTags.COMPRESSED_DATA packet from the stream.
        Parameters:
        pIn - a PGP input stream, with a compressed data packet as the current packet.
        Throws:
        java.io.IOException - if an error occurs reading the packet from the stream.
    • Method Detail

      • getAlgorithm

        public int getAlgorithm()
        Return the compression algorithm used for this packet.
        Returns:
        the compression algorithm code
      • getInputStream

        public java.io.InputStream getInputStream()
        Return the raw input stream contained in the object.

        Note that this stream is shared with the decompression stream, so consuming the returned stream will affect decompression.

        Returns:
        the raw data in the compressed data packet.
      • getDataStream

        public java.io.InputStream getDataStream()
                                          throws PGPException
        Return an input stream that decompresses and returns data in the compressed packet.
        Returns:
        a stream over the uncompressed data.
        Throws:
        PGPException - if an error occurs constructing the decompression stream.