Package org.bouncycastle.openpgp
Class PGPLiteralData
- java.lang.Object
-
- org.bouncycastle.openpgp.PGPLiteralData
-
public class PGPLiteralData extends java.lang.ObjectA single literal data packet in a PGP object stream.
-
-
Field Summary
Fields Modifier and Type Field Description static charBINARYFormat tag for binary literal datastatic java.lang.StringCONSOLEThe special name indicating a "for your eyes only" packet.static java.util.DateNOWThe special time for a modification time of "now" or the present time.static charTEXTFormat tag for textual literal datastatic charUTF8Format tag for UTF-8 encoded textual literal data
-
Constructor Summary
Constructors Constructor Description PGPLiteralData(byte[] encData)Construct a PGP LiteralData carrier from the passed in byte array.PGPLiteralData(java.io.InputStream inStream)Construct a PGP LiteralData carrier from the passed in input stream.PGPLiteralData(BCPGInputStream pIn)Construct a PGP LiteralData carrier from the passed in BCPG input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetDataStream()Return the input stream representing the data stream.java.lang.StringgetFileName()Return the file name associated with the data packet.intgetFormat()Return the format of the data packet.java.io.InputStreamgetInputStream()Return the raw input stream for the data packet.java.util.DategetModificationTime()Return the modification time for the file (at second level precision).byte[]getRawFileName()Return the file name as an uninterpreted (UTF-8 encoded) byte array.
-
-
-
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 java.lang.String CONSOLE
The special name indicating a "for your eyes only" packet.- See Also:
- Constant Field Values
-
NOW
public static final java.util.Date NOW
The special time for a modification time of "now" or the present time.
-
-
Constructor Detail
-
PGPLiteralData
public PGPLiteralData(byte[] encData) throws java.io.IOExceptionConstruct a PGP LiteralData carrier from the passed in byte array.- Parameters:
encData- an encoding of PGP literal data.- Throws:
java.io.IOException- if an error occurs reading from the PGP input.
-
PGPLiteralData
public PGPLiteralData(java.io.InputStream inStream) throws java.io.IOExceptionConstruct a PGP LiteralData carrier from the passed in input stream.- Parameters:
inStream- an input stream containing an encoding of PGP literal data.- Throws:
java.io.IOException- if an error occurs reading from the PGP input.
-
PGPLiteralData
public PGPLiteralData(BCPGInputStream pIn) throws java.io.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:
java.io.IOException- if an error occurs reading from the PGP input.
-
-
Method Detail
-
getFormat
public int getFormat()
-
getFileName
public java.lang.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 java.util.Date getModificationTime()
Return the modification time for the file (at second level precision).
-
getInputStream
public java.io.InputStream getInputStream()
Return the raw input stream for the data packet.
-
getDataStream
public java.io.InputStream getDataStream()
Return the input stream representing the data stream. Equivalent togetInputStream().
-
-