public class ExtensionType
extends java.lang.Object
implements java.lang.Cloneable
extension_type field as defined in
RFC 4366 TLS Extensions.
The general extension structure is defined as (see RFC 4366, or TLS 1.2):
struct {
ExtensionType extension_type;
opaque extension_data<0..2^16-1>;
} Extension;
The extension is identified by its type. The value of the extension
is represented as opaque extension data.
The following extension types are pre-defined by RFC 2546:
enum {
server_name(0), max_fragment_length(1),
client_certificate_url(2), trusted_ca_keys(3),
truncated_hmac(4), status_request(5), (65535)
} ExtensionType;
Extension| Constructor and Description |
|---|
ExtensionType(int type,
java.lang.String name)
Creates an new ExtensionType.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a clone of this ExtensionType.
|
boolean |
equals(java.lang.Object obj)
Compares this ExtensionType to the specified object.
|
java.lang.String |
getName()
Gets the extension type name.
|
int |
getType()
Gets the extension type value.
|
int |
hashCode()
Gets a hashcode of this ExtensionType object.
|
java.lang.String |
toString()
Gets a String representation of this ExtensionType object.
|
public ExtensionType(int type,
java.lang.String name)
type - the extension type valuename - the extension type namejava.lang.IllegalArgumentException - if the extension type value
is out of range (not between 0 and 65535)public int getType()
public java.lang.String getName()
Unkown"
if no name has been assigned to this extension typepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare this ExtensionType against.true, if the given object is equal to this
ExtensionType,
false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object