| Modifier and Type | Field and Description |
|---|---|
| protected final ByteBuffer | |
| protected final int | |
| public static final int | MAX_CONNECTION_ID_LENGTH
The maximum length, in bytes, of a connection id. This is supposed to be version-specific, but for now, we are going to treat that as a universal constant. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | Returns: A new read only buffer containing this connection id bytes.Returns this connection id bytes as a read-only buffer. |
| public int | Returns: -1, 0, or 1 if this connection's id
bytes are less, equal, or greater than the provided bytes.A byte buffer containing the id bytes of another
connection id. idbytes)Compare this connection id bytes with the bytes in the given byte buffer. |
| public int | compareTo(QuicConnectionId o)
Implements java. Compares this object with the specified object for order. |
| public final boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public byte[] | Returns: A new byte array containing this connection id bytes.Returns this connection id bytes as a byte array. |
| public final int | |
| public int | Returns: the length of this connection idReturns the length of this connection id, in bytes; |
| public boolean | Returns: true if the bytes in the given buffer match this connection id bytes.A buffer that delimits a connection id. idbytes)Tells whether the given byte buffer matches this connection id. The given byte buffer is expected to have its position set at the start of the connection id, and its limit at the end. |
| public String | Returns: an hexadecimal string representing this connection id bytes, as returned byHexFormat.of().formatHex(getBytes())Returns an hexadecimal string representing this connection id bytes,
as returned by |
| buf | back to summary |
|---|---|
| protected final ByteBuffer buf | |
| hashCode | back to summary |
|---|---|
| protected final int hashCode | |
| MAX_CONNECTION_ID_LENGTH | back to summary |
|---|---|
| public static final int MAX_CONNECTION_ID_LENGTH The maximum length, in bytes, of a connection id. This is supposed to be version-specific, but for now, we are going to treat that as a universal constant. | |
| QuicConnectionId | back to summary |
|---|---|
| protected QuicConnectionId(ByteBuffer buf) | |
| asReadOnlyBuffer | back to summary |
|---|---|
| public ByteBuffer asReadOnlyBuffer() Returns this connection id bytes as a read-only buffer.
| |
| compareBytes | back to summary |
|---|---|
| public int compareBytes(ByteBuffer idbytes) Compare this connection id bytes with the bytes in the given byte buffer. The given byte buffer is expected to have
its position set at the start
of the connection id, and its limit
at the end. In other words, This method does not advance the buffer position. Implementation Specification This is equivalent to:
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(QuicConnectionId o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() Returns this connection id bytes as a byte array.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| length | back to summary |
|---|---|
| public int length() Returns the length of this connection id, in bytes;
| |
| matches | back to summary |
|---|---|
| public boolean matches(ByteBuffer idbytes) Tells whether the given byte buffer matches this connection id.
The given byte buffer is expected to have
its position set at the start
of the connection id, and its limit
at the end. In other words, This method does not advance the buffer position. Implementation Specification This is equivalent to:
| |
| toHexString | back to summary |
|---|---|
| public String toHexString() Returns an hexadecimal string representing this connection id bytes,
as returned by
| |