java.lang.Object
java.lang.Enum<SU3File.ContentType>
net.i2p.crypto.SU3File.ContentType
All Implemented Interfaces:
Serializable, Comparable<SU3File.ContentType>, java.lang.constant.Constable
Enclosing class:
SU3File

private static enum SU3File.ContentTypeextends Enum<SU3File.ContentType>
The ContentType is the trust domain for the content. The signer and signature will be checked with the trusted certificates for that type.
  • Enum Constant Details

  • Field Details

    • code

      private final int code
      The content type code.
    • name

      private final String name
      The content type name.
  • Constructor Details

    • ContentType

      private ContentType(int code, String name)
      Names one content type.
      Parameters:
      code - the type code
      name - the type name
  • Method Details

    • values

      public static SU3File.ContentType[] 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 SU3File.ContentType 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
    • getCode

      public int getCode()
      The numeric code carried by this content type.
      Returns:
      the numeric code
    • getName

      public String getName()
      The wire name of this content type.
      Returns:
      the wire name
    • getByCode

      public static SU3File.ContentType getByCode(int code)
      Lookup content type by numeric code.
      Parameters:
      code - the numeric content type code
      Returns:
      null if not supported