Class PGPLiteralData


  • public class PGPLiteralData
    extends Object
    A single literal data packet in a PGP object stream.
    • Field Detail

      • BINARY

        public static final char BINARY
        Format tag for binary literal data
        See Also:
        Constant Field Values
      • TEXT

        public static final char TEXT
        Format tag for textual literal data
        See Also:
        Constant Field Values
      • UTF8

        public static final char UTF8
        Format tag for UTF-8 encoded textual literal data
        See Also:
        Constant Field Values
      • CONSOLE

        public static final String CONSOLE
        The special name indicating a "for your eyes only" packet.
        See Also:
        Constant Field Values
      • NOW

        public static final Date NOW
        The special time for a modification time of "now" or the present time.
    • Constructor Detail

      • PGPLiteralData

        public PGPLiteralData​(byte[] encData)
                       throws IOException
        Construct a PGP LiteralData carrier from the passed in byte array.
        Parameters:
        encData - an encoding of PGP literal data.
        Throws:
        IOException - if an error occurs reading from the PGP input.
      • PGPLiteralData

        public PGPLiteralData​(InputStream inStream)
                       throws IOException
        Construct a PGP LiteralData carrier from the passed in input stream.
        Parameters:
        inStream - an input stream containing an encoding of PGP literal data.
        Throws:
        IOException - if an error occurs reading from the PGP input.
      • PGPLiteralData

        public PGPLiteralData​(BCPGInputStream pIn)
                       throws IOException
        Construct a PGP LiteralData carrier from the passed in BCPG input stream.
        Parameters:
        pIn - a BCPG input stream containing an encoded PGP literal data structure.
        Throws:
        IOException - if an error occurs reading from the PGP input.
    • Method Detail

      • getFormat

        public int getFormat()
        Return the format of the data packet. One of BINARY, TEXT or UTF8
      • getFileName

        public String getFileName()
        Return the file name associated with the data packet.
      • getRawFileName

        public byte[] getRawFileName()
        Return the file name as an uninterpreted (UTF-8 encoded) byte array.
      • getModificationTime

        public Date getModificationTime()
        Return the modification time for the file (at second level precision).
      • getInputStream

        public InputStream getInputStream()
        Return the raw input stream for the data packet.
      • getDataStream

        public InputStream getDataStream()
        Return the input stream representing the data stream. Equivalent to getInputStream().