public enum HttpVersion extends java.lang.Enum<HttpVersion>
Enum Constant and Description |
---|
HTTP_0_9 |
HTTP_1_0 |
HTTP_1_1 |
HTTP_2 |
Modifier and Type | Field and Description |
---|---|
static Trie<HttpVersion> |
CACHE |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asString() |
static HttpVersion |
fromString(java.lang.String version)
Case insensitive fromString() conversion
|
static HttpVersion |
fromVersion(int version) |
int |
getVersion() |
boolean |
is(java.lang.String s) |
static HttpVersion |
lookAheadGet(byte[] bytes,
int position,
int limit)
Optimised lookup to find a Http Version and whitespace in a byte array.
|
static HttpVersion |
lookAheadGet(java.nio.ByteBuffer buffer)
Optimised lookup to find a HTTP Version and trailing white space in a byte array.
|
java.nio.ByteBuffer |
toBuffer() |
byte[] |
toBytes() |
java.lang.String |
toString() |
static HttpVersion |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpVersion HTTP_0_9
public static final HttpVersion HTTP_1_0
public static final HttpVersion HTTP_1_1
public static final HttpVersion HTTP_2
public static final Trie<HttpVersion> CACHE
public static HttpVersion[] values()
for (HttpVersion c : HttpVersion.values()) System.out.println(c);
public static HttpVersion valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static HttpVersion lookAheadGet(byte[] bytes, int position, int limit)
bytes
- Array containing ISO-8859-1 charactersposition
- The first valid indexlimit
- The first non valid indexpublic static HttpVersion lookAheadGet(java.nio.ByteBuffer buffer)
buffer
- buffer containing ISO-8859-1 characterspublic byte[] toBytes()
public java.nio.ByteBuffer toBuffer()
public int getVersion()
public boolean is(java.lang.String s)
public java.lang.String asString()
public java.lang.String toString()
toString
in class java.lang.Enum<HttpVersion>
public static HttpVersion fromString(java.lang.String version)
version
- the String to convert to enum constantpublic static HttpVersion fromVersion(int version)
Copyright © 1995–2023 Webtide. All rights reserved.