Package org.bouncycastle.openpgp
Class PGPLiteralData
java.lang.Object
org.bouncycastle.openpgp.PGPLiteralData
A single literal data packet in a PGP object stream.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
Format tag for binary literal datastatic final String
The special name indicating a "for your eyes only" packet.static final char
Format tag for MIME message bodiesstatic final Date
The special time for a modification time of "now" or the present time.static final char
Format tag for textual literal datastatic final char
Format tag for UTF-8 encoded textual literal data -
Constructor Summary
ConstructorDescriptionPGPLiteralData
(byte[] encData) Construct a PGP LiteralData carrier from the passed in byte array.PGPLiteralData
(InputStream inStream) Construct a PGP LiteralData carrier from the passed in input stream.Construct a PGP LiteralData carrier from the passed in BCPG input stream. -
Method Summary
Modifier and TypeMethodDescriptionReturn the input stream representing the data stream.Return the file name associated with the data packet.int
Return the format of the data packet.Return the raw input stream for the data packet.Return the modification time for the file (at second level precision).byte[]
Return the file name as an uninterpreted (UTF-8 encoded) byte array.
-
Field Details
-
BINARY
public static final char BINARYFormat tag for binary literal data- See Also:
-
TEXT
public static final char TEXTFormat tag for textual literal data- See Also:
-
UTF8
public static final char UTF8Format tag for UTF-8 encoded textual literal data- See Also:
-
MIME
public static final char MIMEFormat tag for MIME message bodies- See Also:
-
CONSOLE
The special name indicating a "for your eyes only" packet.- See Also:
-
NOW
The special time for a modification time of "now" or the present time.
-
-
Constructor Details
-
PGPLiteralData
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
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
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 Details
-
getFormat
public int getFormat() -
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
Return the modification time for the file (at second level precision). -
getInputStream
Return the raw input stream for the data packet. -
getDataStream
Return the input stream representing the data stream. Equivalent togetInputStream()
.
-