public final class io.netty.handler.codec.http.Http2CodecUtil extends java.lang.Object
{
public static final int CONNECTION_STREAM_ID;
public static final int HTTP_UPGRADE_STREAM_ID;
public static final java.lang.CharSequence HTTP_UPGRADE_SETTINGS_HEADER;
public static final java.lang.CharSequence HTTP_UPGRADE_PROTOCOL_NAME;
public static final java.lang.CharSequence TLS_UPGRADE_PROTOCOL_NAME;
public static final int PING_FRAME_PAYLOAD_LENGTH;
public static final short MAX_UNSIGNED_BYTE;
public static final int MAX_PADDING;
public static final long MAX_UNSIGNED_INT;
public static final int FRAME_HEADER_LENGTH;
public static final int SETTING_ENTRY_LENGTH;
public static final int PRIORITY_ENTRY_LENGTH;
public static final int INT_FIELD_LENGTH;
public static final short MAX_WEIGHT;
public static final short MIN_WEIGHT;
private static final io.netty.buffer.ByteBuf CONNECTION_PREFACE;
private static final int MAX_PADDING_LENGTH_LENGTH;
public static final int DATA_FRAME_HEADER_LENGTH;
public static final int HEADERS_FRAME_HEADER_LENGTH;
public static final int PRIORITY_FRAME_LENGTH;
public static final int RST_STREAM_FRAME_LENGTH;
public static final int PUSH_PROMISE_FRAME_HEADER_LENGTH;
public static final int GO_AWAY_FRAME_HEADER_LENGTH;
public static final int WINDOW_UPDATE_FRAME_LENGTH;
public static final int CONTINUATION_FRAME_HEADER_LENGTH;
public static final char SETTINGS_HEADER_TABLE_SIZE;
public static final char SETTINGS_ENABLE_PUSH;
public static final char SETTINGS_MAX_CONCURRENT_STREAMS;
public static final char SETTINGS_INITIAL_WINDOW_SIZE;
public static final char SETTINGS_MAX_FRAME_SIZE;
public static final char SETTINGS_MAX_HEADER_LIST_SIZE;
public static final int NUM_STANDARD_SETTINGS;
public static final long MAX_HEADER_TABLE_SIZE;
public static final long MAX_CONCURRENT_STREAMS;
public static final int MAX_INITIAL_WINDOW_SIZE;
public static final int MAX_FRAME_SIZE_LOWER_BOUND;
public static final int MAX_FRAME_SIZE_UPPER_BOUND;
public static final long MAX_HEADER_LIST_SIZE;
public static final long MIN_HEADER_TABLE_SIZE;
public static final long MIN_CONCURRENT_STREAMS;
public static final int MIN_INITIAL_WINDOW_SIZE;
public static final long MIN_HEADER_LIST_SIZE;
public static final int DEFAULT_WINDOW_SIZE;
public static final short DEFAULT_PRIORITY_WEIGHT;
public static final int DEFAULT_HEADER_TABLE_SIZE;
public static final long DEFAULT_HEADER_LIST_SIZE;
public static final int DEFAULT_MAX_FRAME_SIZE;
public static final int SMALLEST_MAX_CONCURRENT_STREAMS;
static final int DEFAULT_MAX_RESERVED_STREAMS;
static final int DEFAULT_MIN_ALLOCATION_CHUNK;
public static final long DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT_MILLIS;
public static final int DEFAULT_MAX_QUEUED_CONTROL_FRAMES;
public static long calculateMaxHeaderListSizeGoAway(long)
{
long v, v, v;
v := @parameter: long;
v = v >>> 2;
v = v + v;
return v;
}
public static boolean isOutboundStream(boolean, int)
{
int v, v;
boolean v, v, v;
v := @parameter: boolean;
v := @parameter: int;
v = v & 1;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
if v <= 0 goto label;
if v != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public static boolean isStreamIdValid(int)
{
int v;
boolean v;
v := @parameter: int;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
static boolean isStreamIdValid(int, boolean)
{
int v, v;
boolean v, v, v, v;
v := @parameter: int;
v := @parameter: boolean;
v = staticinvoke <io.netty.handler.codec.http.Http2CodecUtil: boolean isStreamIdValid(int)>(v);
if v == 0 goto label;
v = v & 1;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
if v != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public static boolean isMaxFrameSizeValid(int)
{
int v;
boolean v;
v := @parameter: int;
if v < 16384 goto label;
if v > 16777215 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public static io.netty.buffer.ByteBuf connectionPrefaceBuf()
{
io.netty.buffer.ByteBuf v, v;
v = <io.netty.handler.codec.http.Http2CodecUtil: io.netty.buffer.ByteBuf CONNECTION_PREFACE>;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf retainedDuplicate()>();
return v;
}
public static io.netty.handler.codec.http.Http2Exception getEmbeddedHttp2Exception(java.lang.Throwable)
{
java.lang.Throwable v;
boolean v;
v := @parameter: java.lang.Throwable;
label:
if v == null goto label;
v = v instanceof io.netty.handler.codec.http.Http2Exception;
if v == 0 goto label;
return v;
label:
v = virtualinvoke v.<java.lang.Throwable: java.lang.Throwable getCause()>();
goto label;
label:
return null;
}
public static io.netty.buffer.ByteBuf toByteBuf(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)
{
java.lang.Throwable v;
io.netty.channel.ChannelHandlerContext v;
io.netty.buffer.ByteBuf v, v;
io.netty.buffer.ByteBufAllocator v;
java.lang.String v, v;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Throwable;
if v == null goto label;
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
if v != null goto label;
label:
v = <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf EMPTY_BUFFER>;
return v;
label:
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.buffer.ByteBufAllocator alloc()>();
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
v = staticinvoke <io.netty.buffer.ByteBufUtil: io.netty.buffer.ByteBuf writeUtf8(io.netty.buffer.ByteBufAllocator,java.lang.CharSequence)>(v, v);
return v;
}
public static int readUnsignedInt(io.netty.buffer.ByteBuf)
{
int v, v;
io.netty.buffer.ByteBuf v;
v := @parameter: io.netty.buffer.ByteBuf;
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readInt()>();
v = v & 2147483647;
return v;
}
public static void writeFrameHeader(io.netty.buffer.ByteBuf, int, byte, io.netty.handler.codec.http.Http2Flags, int)
{
byte v;
io.netty.buffer.ByteBuf v;
io.netty.handler.codec.http.Http2Flags v;
int v, v, v;
v := @parameter: io.netty.buffer.ByteBuf;
v := @parameter: int;
v := @parameter: byte;
v := @parameter: io.netty.handler.codec.http.Http2Flags;
v := @parameter: int;
v = 9 + v;
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf ensureWritable(int)>(v);
staticinvoke <io.netty.handler.codec.http.Http2CodecUtil: void writeFrameHeaderInternal(io.netty.buffer.ByteBuf,int,byte,io.netty.handler.codec.http.Http2Flags,int)>(v, v, v, v, v);
return;
}
public static int streamableBytes(io.netty.handler.codec.http.StreamByteDistributor$StreamState)
{
int v, v;
long v, v;
io.netty.handler.codec.http.StreamByteDistributor$StreamState v;
v := @parameter: io.netty.handler.codec.http.StreamByteDistributor$StreamState;
v = interfaceinvoke v.<io.netty.handler.codec.http.StreamByteDistributor$StreamState: long pendingBytes()>();
v = interfaceinvoke v.<io.netty.handler.codec.http.StreamByteDistributor$StreamState: int windowSize()>();
v = staticinvoke <java.lang.Math: long min(long,long)>(v, v);
v = staticinvoke <java.lang.Math: int max(int,int)>(0, v);
return v;
}
public static void headerListSizeExceeded(int, long, boolean) throws io.netty.handler.codec.http.Http2Exception
{
java.lang.Object[] v;
java.lang.Long v;
io.netty.handler.codec.http.Http2Exception v;
int v;
io.netty.handler.codec.http.Http2Error v;
long v;
boolean v;
v := @parameter: int;
v := @parameter: long;
v := @parameter: boolean;
v = <io.netty.handler.codec.http.Http2Error: io.netty.handler.codec.http.Http2Error PROTOCOL_ERROR>;
v = newarray (java.lang.Object)[1];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <io.netty.handler.codec.http.Http2Exception: io.netty.handler.codec.http.Http2Exception headerListSizeError(int,io.netty.handler.codec.http.Http2Error,boolean,java.lang.String,java.lang.Object[])>(v, v, v, "Header size exceeded max allowed size (%d)", v);
throw v;
}
public static void headerListSizeExceeded(long) throws io.netty.handler.codec.http.Http2Exception
{
java.lang.Object[] v;
java.lang.Long v;
io.netty.handler.codec.http.Http2Exception v;
io.netty.handler.codec.http.Http2Error v;
long v;
v := @parameter: long;
v = <io.netty.handler.codec.http.Http2Error: io.netty.handler.codec.http.Http2Error PROTOCOL_ERROR>;
v = newarray (java.lang.Object)[1];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <io.netty.handler.codec.http.Http2Exception: io.netty.handler.codec.http.Http2Exception connectionError(io.netty.handler.codec.http.Http2Error,java.lang.String,java.lang.Object[])>(v, "Header size exceeded max allowed size (%d)", v);
throw v;
}
static void writeFrameHeaderInternal(io.netty.buffer.ByteBuf, int, byte, io.netty.handler.codec.http.Http2Flags, int)
{
short v;
byte v;
io.netty.buffer.ByteBuf v;
io.netty.handler.codec.http.Http2Flags v;
int v, v;
v := @parameter: io.netty.buffer.ByteBuf;
v := @parameter: int;
v := @parameter: byte;
v := @parameter: io.netty.handler.codec.http.Http2Flags;
v := @parameter: int;
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeMedium(int)>(v);
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeByte(int)>(v);
v = virtualinvoke v.<io.netty.handler.codec.http.Http2Flags: short value()>();
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeByte(int)>(v);
virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeInt(int)>(v);
return;
}
public static void verifyPadding(int)
{
java.lang.Object[] v;
int v;
java.lang.String v;
java.lang.IllegalArgumentException v;
java.lang.Integer v, v;
v := @parameter: int;
if v < 0 goto label;
if v <= 256 goto label;
label:
v = new java.lang.IllegalArgumentException;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(256);
v[1] = v;
v = staticinvoke <java.lang.String: java.lang.String format(java.lang.String,java.lang.Object[])>("Invalid padding \'%d\'. Padding must be between 0 and %d (inclusive).", v);
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
return;
}
private void <init>()
{
io.netty.handler.codec.http.Http2CodecUtil v;
v := @this: io.netty.handler.codec.http.Http2CodecUtil;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
static void <clinit>()
{
byte[] v;
io.netty.util.AsciiString v;
long v;
java.util.concurrent.TimeUnit v, v;
io.netty.buffer.ByteBuf v, v, v, v;
java.nio.charset.Charset v;
java.lang.String v;
v = staticinvoke <io.netty.util.AsciiString: io.netty.util.AsciiString cached(java.lang.String)>("HTTP2-Settings");
<io.netty.handler.codec.http.Http2CodecUtil: java.lang.CharSequence HTTP_UPGRADE_SETTINGS_HEADER> = v;
<io.netty.handler.codec.http.Http2CodecUtil: java.lang.CharSequence HTTP_UPGRADE_PROTOCOL_NAME> = "h2c";
<io.netty.handler.codec.http.Http2CodecUtil: java.lang.CharSequence TLS_UPGRADE_PROTOCOL_NAME> = "h2";
v = staticinvoke <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf directBuffer(int)>(24);
v = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
v = <io.netty.util.CharsetUtil: java.nio.charset.Charset UTF_8>;
v = virtualinvoke v.<java.lang.String: byte[] getBytes(java.nio.charset.Charset)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf writeBytes(byte[])>(v);
v = staticinvoke <io.netty.buffer.Unpooled: io.netty.buffer.ByteBuf unreleasableBuffer(io.netty.buffer.ByteBuf)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: io.netty.buffer.ByteBuf asReadOnly()>();
<io.netty.handler.codec.http.Http2CodecUtil: io.netty.buffer.ByteBuf CONNECTION_PREFACE> = v;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit SECONDS>;
v = virtualinvoke v.<java.util.concurrent.TimeUnit: long convert(long,java.util.concurrent.TimeUnit)>(30L, v);
<io.netty.handler.codec.http.Http2CodecUtil: long DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT_MILLIS> = v;
return;
}
}