Top Description Fields Constructors Methods
org.bouncycastle.openpgp

public Class PGPLiteralData

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, java.util.Date, org.bouncycastle.bcpg.BCPGInputStream, .LiteralDataPacket, .Packet, .PacketTags

A single literal data packet in a PGP object stream.

Field Summary

Modifier and TypeField and Description
public static final char
BINARY

Format tag for binary literal data

public static final String
CONSOLE

The special name indicating a "for your eyes only" packet.

pack-priv LiteralDataPacket
public static final char
MIME

Format tag for MIME message bodies

public static final Date
NOW

The special time for a modification time of "now" or the present time.

public static final char
TEXT

Format tag for textual literal data

public static final char
UTF8

Format tag for UTF-8 encoded textual literal data

Constructor Summary

AccessConstructor and Description
public
PGPLiteralData(byte[]
an encoding of PGP literal data.
encData
)

Construct a PGP LiteralData carrier from the passed in byte array.

public
PGPLiteralData(InputStream
an input stream containing an encoding of PGP literal data.
inStream
)

Construct a PGP LiteralData carrier from the passed in input stream.

public
PGPLiteralData(BCPGInputStream
a BCPG input stream containing an encoded PGP literal data structure.
pIn
)

Construct a PGP LiteralData carrier from the passed in BCPG input stream.

Method Summary

Modifier and TypeMethod and Description
public InputStream
getDataStream()

Return the input stream representing the data stream.

public String
getFileName()

Return the file name associated with the data packet.

public int
getFormat()

Return the format of the data packet.

public InputStream
getInputStream()

Return the raw input stream for the data packet.

public Date
getModificationTime()

Return the modification time for the file (at second level precision).

public byte[]
getRawFileName()

Return the file name as an uninterpreted (UTF-8 encoded) byte array.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BINARYback to summary
public static final char BINARY

Format tag for binary literal data

CONSOLEback to summary
public static final String CONSOLE

The special name indicating a "for your eyes only" packet.

databack to summary
pack-priv LiteralDataPacket data
MIMEback to summary
public static final char MIME

Format tag for MIME message bodies

NOWback to summary
public static final Date NOW

The special time for a modification time of "now" or the present time.

TEXTback to summary
public static final char TEXT

Format tag for textual literal data

UTF8back to summary
public static final char UTF8

Format tag for UTF-8 encoded textual literal data

Constructor Detail

PGPLiteralDataback to summary
public PGPLiteralData(byte[] encData) throws IOException

Construct a PGP LiteralData carrier from the passed in byte array.

Parameters
encData:byte[]

an encoding of PGP literal data.

Exceptions
IOException:
if an error occurs reading from the PGP input.
PGPLiteralDataback to summary
public PGPLiteralData(InputStream inStream) throws IOException

Construct a PGP LiteralData carrier from the passed in input stream.

Parameters
inStream:InputStream

an input stream containing an encoding of PGP literal data.

Exceptions
IOException:
if an error occurs reading from the PGP input.
PGPLiteralDataback to summary
public PGPLiteralData(BCPGInputStream pIn) throws IOException

Construct a PGP LiteralData carrier from the passed in BCPG input stream.

Parameters
pIn:BCPGInputStream

a BCPG input stream containing an encoded PGP literal data structure.

Exceptions
IOException:
if an error occurs reading from the PGP input.

Method Detail

getDataStreamback to summary
public InputStream getDataStream()

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

getFileNameback to summary
public String getFileName()

Return the file name associated with the data packet.

getFormatback to summary
public int getFormat()

Return the format of the data packet. One of BINARY, TEXT, MIME or UTF8

getInputStreamback to summary
public InputStream getInputStream()

Return the raw input stream for the data packet.

getModificationTimeback to summary
public Date getModificationTime()

Return the modification time for the file (at second level precision).

getRawFileNameback to summary
public byte[] getRawFileName()

Return the file name as an uninterpreted (UTF-8 encoded) byte array.