class Http2FrameCodec extends Http2ConnectionHandler {

  final boolean consumeBytes(final int streamId, final int bytes) throws Http2Exception {
    final Http2Stream stream = connection().stream(streamId);
    // Upgraded requests are ineligible for stream control. We add the null check
    // in case the stream has been deregistered.
    if (stream != null && streamId == Http2CodecUtil.HTTP_UPGRADE_STREAM_ID) {
      final Boolean upgraded = stream.getProperty(upgradeKey);
      if (Boolean.TRUE.equals(upgraded)) {
        return false;
      }
    }

    return connection().local().flowController().consumeBytes(stream, bytes);
  }

    Http2FrameCodec(
      final Http2ConnectionEncoder encoder,
      final Http2ConnectionDecoder decoder,
      final Http2Settings initialSettings,
      final boolean decoupleCloseAndGoAway);

}