public enum CompressionMethod extends Enum<CompressionMethod>
Instances of this enumeration do not implement any compression functionality. They merely serve as an object representation of the identifiers defined in Transport Layer Security Protocol Compression Methods.
Note that only the NULL compression method is supported at the
moment.
| Modifier and Type | Field and Description |
|---|---|
static int |
COMPRESSION_METHOD_BITS |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode() |
static CompressionMethod |
getMethodByCode(int code) |
static List<CompressionMethod> |
listFromReader(org.eclipse.californium.elements.util.DatagramReader reader)
Takes a reader and creates the representing list of compression methods.
|
static byte[] |
listToByteArray(List<CompressionMethod> compressionMethods)
Takes a list of compression methods and creates the representing byte
stream.
|
static CompressionMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompressionMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompressionMethod NULL
public static final CompressionMethod DEFLATE
public static final int COMPRESSION_METHOD_BITS
public static CompressionMethod[] values()
for (CompressionMethod c : CompressionMethod.values()) System.out.println(c);
public static CompressionMethod valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getCode()
public static CompressionMethod getMethodByCode(int code)
public static byte[] listToByteArray(List<CompressionMethod> compressionMethods)
compressionMethods - the list of the compression methodspublic static List<CompressionMethod> listFromReader(org.eclipse.californium.elements.util.DatagramReader reader)
reader - the encoded compression methods as byte arrayCopyright © 2023 Eclipse Foundation. All rights reserved.