Class PGPLiteralData
java.lang.Object
org.bouncycastle.openpgp.PGPLiteralData
A single literal data packet in a PGP object stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charFormat tag for binary literal datastatic final StringThe special name indicating a "for your eyes only" packet.static final charFormat tag for MIME message bodiesstatic final DateThe special time for a modification time of "now" or the present time.static final charFormat tag for textual literal datastatic final charFormat tag for UTF-8 encoded textual literal data -
Constructor Summary
ConstructorsConstructorDescriptionPGPLiteralData(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, decoded as UTF-8.intReturn 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
-
getFileName
Return the file name associated with the data packet, decoded as UTF-8. A file name that is not valid UTF-8 has each malformed sequence decoded as U+FFFD rather than causing an exception; usegetRawFileName()for the exact bytes. -
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().
-