Enum Class PacketFormat

java.lang.Object
java.lang.Enum<PacketFormat>
org.bouncycastle.bcpg.PacketFormat
All Implemented Interfaces:
Serializable, Comparable<PacketFormat>, Constable

public enum PacketFormat extends Enum<PacketFormat>
OpenPGP Packet Header Length Format.
See Also:
  • Enum Constant Details

    • LEGACY

      public static final PacketFormat LEGACY
      Always use the old (legacy) packet format.
    • CURRENT

      public static final PacketFormat CURRENT
      Always use the current (new) packet format.
    • ROUNDTRIP

      public static final PacketFormat ROUNDTRIP
      Let the individual packet decide the format (see Packet.hasNewPacketFormat()). This allows to round-trip packets without changing the packet format.
  • Method Details

    • values

      public static PacketFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PacketFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null