Package org.bouncycastle.bcpg
Class Packet
- java.lang.Object
-
- org.bouncycastle.bcpg.Packet
-
- All Implemented Interfaces:
PacketTags
- Direct Known Subclasses:
ContainedPacket
,InputStreamPacket
public class Packet extends java.lang.Object implements PacketTags
-
-
Field Summary
-
Fields inherited from interface org.bouncycastle.bcpg.PacketTags
AEAD_ENC_DATA, COMPRESSED_DATA, EXPERIMENTAL_1, EXPERIMENTAL_2, EXPERIMENTAL_3, EXPERIMENTAL_4, LITERAL_DATA, MARKER, MOD_DETECTION_CODE, ONE_PASS_SIGNATURE, PADDING, PUBLIC_KEY, PUBLIC_KEY_ENC_SESSION, PUBLIC_SUBKEY, RESERVED, SECRET_KEY, SECRET_SUBKEY, SIGNATURE, SYM_ENC_INTEGRITY_PRO, SYMMETRIC_KEY_ENC, SYMMETRIC_KEY_ENC_SESSION, TRUST, USER_ATTRIBUTE, USER_ID
-
-
Constructor Summary
Constructors Constructor Description Packet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPacketTag()
Return the tag of the packet.boolean
hasNewPacketFormat()
Return true, if this instance of a packet was encoded using the new packet format.boolean
isCritical()
Returns whether the packet is to be considered critical for v6 implementations.
-
-
-
Method Detail
-
getPacketTag
public final int getPacketTag()
Return the tag of the packet.- Returns:
- packet tag
-
hasNewPacketFormat
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:
- true if new packet format encoding is used
-
isCritical
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:
- true if the packet is critical, false otherwise.
- See Also:
- OpenPGP - Packet Tags
-
-