public class MaxFragmentLengthExtension extends HelloExtension
Instances of this class can be serialized to and deserialized from the MaxFragmentLength data structure defined in RFC 6066, Section 4.
| Modifier and Type | Class and Description |
|---|---|
static class |
MaxFragmentLengthExtension.Length
The codes representing the lengths that can be negotiated using the
Max Fragment Length Hello extension.
|
HelloExtension.ExtensionType| Modifier and Type | Field and Description |
|---|---|
static int |
CODE_BITS |
LENGTH_BITS, TYPE_BITS| Constructor and Description |
|---|
MaxFragmentLengthExtension(int fragmentLengthCode) |
MaxFragmentLengthExtension(MaxFragmentLengthExtension.Length fragmentLength) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
Adds binary encoding of this extension's data.
|
MaxFragmentLengthExtension.Length |
getFragmentLength() |
int |
getLength()
Gets the overall length of this extension's corresponding Extension struct.
|
String |
toString() |
fromExtensionDataReader, toByteArraypublic static final int CODE_BITS
public MaxFragmentLengthExtension(int fragmentLengthCode)
public MaxFragmentLengthExtension(MaxFragmentLengthExtension.Length fragmentLength)
public MaxFragmentLengthExtension.Length getFragmentLength()
public int getLength()
HelloExtensionNote that this includes the 2 bytes indicating the extension type.
getLength in class HelloExtensionprotected void addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
HelloExtensionThis implementation does not do anything. Sub-classes should override this method and use the passed-in writer to add their extension_data bytes to the Extension data structure.
NB: Subclasses MUST NOT write the extension's type code to the writer
as this will already have been done by the HelloExtension.toByteArray() method.
addExtensionData in class HelloExtensionwriter - the writer to use for serializationpublic String toString()
toString in class HelloExtensionCopyright © 2023 Eclipse Foundation. All rights reserved.