Top Fields Constructors Methods
org.bouncycastle.bcpg

public Class Packet

extends Object
implements PacketTags
Class Inheritance
All Implemented Interfaces
org.bouncycastle.bcpg.PacketTags
Known Direct Subclasses
org.bouncycastle.bcpg.ContainedPacket, org.bouncycastle.bcpg.InputStreamPacket

Field Summary

Modifier and TypeField and Description
private final boolean
private final int

Constructor Summary

AccessConstructor and Description
public
pack-priv
Packet(int packetTag)

pack-priv
Packet(int packetTag, boolean newPacketFormat)

Method Summary

Modifier and TypeMethod and Description
public final int

Returns:

packet tag
getPacketTag
()

Return the tag of the packet.

public boolean

Returns:

true if new packet format encoding is used
hasNewPacketFormat
()

Return true, if this instance of a packet was encoded using the new packet format.

public boolean

Returns:

true if the packet is critical, false otherwise.
isCritical
()

Returns whether the packet is to be considered critical for v6 implementations.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

newPacketFormatback to summary
private final boolean newPacketFormat
packetTagback to summary
private final int packetTag

Constructor Detail

Packetback to summary
public Packet()
Packetback to summary
pack-priv Packet(int packetTag)
Packetback to summary
pack-priv Packet(int packetTag, boolean newPacketFormat)

Method Detail

getPacketTagback to summary
public final int getPacketTag()

Return the tag of the packet.

Returns:int

packet tag

hasNewPacketFormatback to summary
public boolean hasNewPacketFormat()

Return true, if this instance of a packet was encoded using the new packet format. If the packet was encoded using the old legacy format, return false instead.

Returns:boolean

true if new packet format encoding is used

isCriticalback to summary
public boolean isCritical()

Returns whether the packet is to be considered critical for v6 implementations. Packets with tags less or equal to 39 are critical. Tags 40 to 59 are reserved for unassigned, non-critical packets. Tags 60 to 63 are non-critical private or experimental packets.

Returns:boolean

true if the packet is critical, false otherwise.

See Also
OpenPGP - Packet Tags