@Override public void onStreamRemoved(Http2Stream stream) { final Http2Decompressor decompressor = decompressor(stream); if (decompressor != null) { cleanup(decompressor); } } });
@Override public boolean consumeBytes(Http2Stream stream, int numBytes) throws Http2Exception { Http2Decompressor decompressor = decompressor(stream); if (decompressor != null) { // Convert the decompressed bytes to compressed (on the wire) bytes. numBytes = decompressor.consumeBytes(stream.id(), numBytes); } try { return flowController.consumeBytes(stream, numBytes); } catch (Http2Exception e) { throw e; } catch (Throwable t) { // The stream should be closed at this point. We have already changed our state tracking the compressed // bytes, and there is no guarantee we can recover if the underlying flow controller throws. throw streamError(stream.id(), INTERNAL_ERROR, t, "Error while returning bytes to flow control window"); } }
throws Http2Exception { final Http2Stream stream = connection.stream(streamId); final Http2Decompressor decompressor = decompressor(stream); if (decompressor == null) {
Http2Decompressor decompressor = decompressor(stream); if (decompressor == null && !endOfStream) {
@Override public void onStreamRemoved(Http2Stream stream) { final Http2Decompressor decompressor = decompressor(stream); if (decompressor != null) { cleanup(decompressor); } } });
@Override public void onStreamRemoved(Http2Stream stream) { final Http2Decompressor decompressor = decompressor(stream); if (decompressor != null) { cleanup(decompressor); } } });
@Override public boolean consumeBytes(Http2Stream stream, int numBytes) throws Http2Exception { Http2Decompressor decompressor = decompressor(stream); if (decompressor != null) { // Convert the decompressed bytes to compressed (on the wire) bytes. numBytes = decompressor.consumeBytes(stream.id(), numBytes); } try { return flowController.consumeBytes(stream, numBytes); } catch (Http2Exception e) { throw e; } catch (Throwable t) { // The stream should be closed at this point. We have already changed our state tracking the compressed // bytes, and there is no guarantee we can recover if the underlying flow controller throws. throw streamError(stream.id(), INTERNAL_ERROR, t, "Error while returning bytes to flow control window"); } }
@Override public boolean consumeBytes(Http2Stream stream, int numBytes) throws Http2Exception { Http2Decompressor decompressor = decompressor(stream); if (decompressor != null) { // Convert the decompressed bytes to compressed (on the wire) bytes. numBytes = decompressor.consumeBytes(stream.id(), numBytes); } try { return flowController.consumeBytes(stream, numBytes); } catch (Http2Exception e) { throw e; } catch (Throwable t) { // The stream should be closed at this point. We have already changed our state tracking the compressed // bytes, and there is no guarantee we can recover if the underlying flow controller throws. throw streamError(stream.id(), INTERNAL_ERROR, t, "Error while returning bytes to flow control window"); } }
throws Http2Exception { final Http2Stream stream = connection.stream(streamId); final Http2Decompressor decompressor = decompressor(stream); if (decompressor == null) {
throws Http2Exception { final Http2Stream stream = connection.stream(streamId); final Http2Decompressor decompressor = decompressor(stream); if (decompressor == null) {
Http2Decompressor decompressor = decompressor(stream); if (decompressor == null && !endOfStream) {
Http2Decompressor decompressor = decompressor(stream); if (decompressor == null && !endOfStream) {