Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.javax.net.ssl.provider.ExtensionList
ClientHello
or
ServerHello
. The form of the extensions list is:
Extension extensions_list<1..2^16-1>
Nested Class Summary | |
class |
|
Constructor Summary | |
| |
|
Method Summary | |
ByteBuffer |
|
Extension |
|
Iterator |
|
int |
|
void | |
void |
|
void |
|
int |
|
String |
|
String |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public int length()
Returns the length of this extension list, in bytes.
- Specified by:
- length in interface Constructed
- Returns:
- The length of this extension list, in bytes.
public void set(int index, Extension e)
Sets the extension at index i to e. Note that setting an element at an index may invalidate any other elements that come after element at index i. In other words, no attempt is made to move existing elements in this list, and since extensions are variable length, you can not guarantee that extensions later in the list will still be valid. Thus, elements of this list must be set in order of increasing index.
- Parameters:
index
- The index to set the extension at.e
- The extension.
- Throws:
BufferOverflowException
- If setting the extension overflows the buffer.IllegalArgumentException
- If it isn't possible to find the given index in the current list (say, if no element index - 1 is set), or if setting the extension will overflow the current list length (given bylength()
).
public void set(int index, Extension.Type t, int eLength)
Reserve space for an extension at index i in the list. In other words, this does the job ofset(int,Extension)
, but does not copy the extension value to the underlying buffer.
- Parameters:
index
- The index of the extension to reserve space for.t
- The type of the extension.eLength
- The number of bytes to reserve for this extension. The total number of bytes used by this method is this length, plus four.
public void setLength(int newLength)
Set the total length of this list, in bytes.
- Parameters:
newLength
- The new list length.
public int size()
Returns the number of extensions this list contains.
- Returns:
- The number of extensions.