- All Implemented Interfaces:
Serializable, Comparable<SU3File.ContentType>, java.lang.constant.Constable
- Enclosing class:
SU3File
The ContentType is the trust domain for the content. The signer and signature will be checked with the trusted certificates for that type.
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsField Summary
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic SU3File.ContentTypegetByCode(int code) Lookup content type by numeric code.intgetCode()The numeric code carried by this content type.getName()The wire name of this content type.static SU3File.ContentTypeReturns the enum constant of this class with the specified name.static SU3File.ContentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
UNKNOWN
Content of an unknown type.ROUTER
A router update file.PLUGIN
A plugin or tarball file.RESEED
A reseed file.NEWS
A news feed file.BLOCKLIST
A blocklist file.
Field Details
code
private final int codeThe content type code.name
The content type name.
Constructor Details
ContentType
Names one content type.- Parameters:
code- the type codename- the type name
Method Details
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
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 nameNullPointerException- if the argument is null
getCode
public int getCode()The numeric code carried by this content type.- Returns:
- the numeric code
getName
getByCode
Lookup content type by numeric code.- Parameters:
code- the numeric content type code- Returns:
- null if not supported