private int lengthWithoutPadding(int length, byte flags, short padding) throws IOException {
        if ((flags & Http2.FLAG_PADDED) != 0) {
            length--; // Account for reading the padding length.
        }
        if (padding > length) {
            throw new IOException("Http2 PROTOCOL_ERROR padding " + padding + " > remaining length " + length);
        }
        return (short) (length - padding);
    }
Decodes HTTP2 request and response packets.

@author Megatron King
@since 2019/1/5 14:19
netbare-core/src/main/java/com/github/megatronking/netbare/http2/Http2DecodeInterceptor.java