public final class Http2ExampleUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
UPGRADE_RESPONSE_HEADER
Response header sent in response to the http->http2 cleartext upgrade request.
|
Modifier and Type | Method and Description |
---|---|
static String |
firstValue(QueryStringDecoder query,
String key) |
static ByteBuf |
toByteBuf(InputStream input)
Reads an InputStream into a byte array.
|
static int |
toInt(String string,
int defaultValue) |
public static final String UPGRADE_RESPONSE_HEADER
public static int toInt(String string, int defaultValue)
string
- the string to be converted to an integer.defaultValue
- the default valuepublic static ByteBuf toByteBuf(InputStream input) throws IOException
input
- the InputStream.IOException
- if an I/O exception of some sort happens while reading the InputStream.public static String firstValue(QueryStringDecoder query, String key)
query
- the decoder of query stringkey
- the key to lookupCopyright © 2008–2021 The Netty Project. All rights reserved.