Package org.eclipse.hono.config
Enum Class FileFormat
- All Implemented Interfaces:
Serializable
,Comparable<FileFormat>
,Constable
File formats for using key materials.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileFormat
Detects the file format based on a file name's extension.static FileFormat
orDetect
(FileFormat format, String path) Use the provided file format or detect.static FileFormat
Returns the enum constant of this class with the specified name.static FileFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PEM
PEM encoded PKCS#1 or PKCS#8. -
JKS
Java Key Store. -
PKCS12
PKCS#12 key store.
-
-
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
-
orDetect
Use the provided file format or detect. If the file format is not provided the method will try to detect it by a call todetect(String)
.- Parameters:
format
- The provided format, may benull
path
- The path to check, may benull
.- Returns:
- The provided or detected file format or
null
, if the path isnull
or the format could not be detected. Never returnsnull
when parameterformat
is notnull
.
-
detect
Detects the file format based on a file name's extension.- Parameters:
path
- The relative or absolute file name, may benull
.- Returns:
- The file format or
null
if the path isnull
or the file name's extension is not supported.
-