public final class Http2ExampleUtil
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
UPGRADE_RESPONSE_HEADER
Response header sent in response to the http->http2 cleartext upgrade request.
|
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
firstValue(QueryStringDecoder query,
java.lang.String key) |
static ByteBuf |
toByteBuf(java.io.InputStream input)
Reads an InputStream into a byte array.
|
static int |
toInt(java.lang.String string,
int defaultValue) |
public static final java.lang.String UPGRADE_RESPONSE_HEADER
public static int toInt(java.lang.String string, int defaultValue)
string
- the string to be converted to an integer.defaultValue
- the default valuepublic static ByteBuf toByteBuf(java.io.InputStream input) throws java.io.IOException
input
- the InputStream.java.io.IOException
- if an I/O exception of some sort happens while reading the InputStream.public static java.lang.String firstValue(QueryStringDecoder query, java.lang.String key)
query
- the decoder of query stringkey
- the key to lookup