Top Description Inners Fields Constructors Methods
org.eclipse.jetty.client

public Class GZIPContentDecoder

extends GZIPContentDecoder
implements ContentDecoder
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.ContentDecoder
Imports
java.util.ListIterator, org.eclipse.jetty.client.transport.HttpResponse, org.eclipse.jetty.http.HttpField, .HttpHeader, org.eclipse.jetty.io.ByteBufferPool, .RetainableByteBuffer

ContentDecoder for the "gzip" encoding.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
GZIPContentDecoder.Factory

Specialized ContentDecoder.Factory for the "gzip" encoding.

Field Summary

Modifier and TypeField and Description
private long
public static final int

Constructor Summary

AccessConstructor and Description
public
public
GZIPContentDecoder(int bufferSize)

public
GZIPContentDecoder(ByteBufferPool byteBufferPool, int bufferSize)

Method Summary

Modifier and TypeMethod and Description
public void
afterDecoding(Response response)

Overrides default org.eclipse.jetty.client.ContentDecoder.afterDecoding.

Processes the exchange after the response content has been decoded.

public void
beforeDecoding(Response response)

Overrides default org.eclipse.jetty.client.ContentDecoder.beforeDecoding.

Processes the response just before the decoding of the response content.

protected boolean
decodedChunk(RetainableByteBuffer
the inflated chunk of data
chunk
)

Overrides org.eclipse.jetty.http.GZIPContentDecoder.decodedChunk.

Called when a chunk of data is inflated.

Inherited from org.eclipse.jetty.http.GZIPContentDecoder:
acquiredecodedecodeChunksdestroyisFinished

Field Detail

decodedLengthback to summary
private long decodedLength
DEFAULT_BUFFER_SIZEback to summary
public static final int DEFAULT_BUFFER_SIZE

Constructor Detail

GZIPContentDecoderback to summary
public GZIPContentDecoder()
GZIPContentDecoderback to summary
public GZIPContentDecoder(int bufferSize)
GZIPContentDecoderback to summary
public GZIPContentDecoder(ByteBufferPool byteBufferPool, int bufferSize)

Method Detail

afterDecodingback to summary
public void afterDecoding(Response response)

Overrides default org.eclipse.jetty.client.ContentDecoder.afterDecoding.

Doc from org.eclipse.jetty.client.ContentDecoder.afterDecoding.

Processes the exchange after the response content has been decoded.

Typical processing may involve modifying the response headers, for example updating the Content-Length header to the length of the decoded response content.

Annotations
@Override
beforeDecodingback to summary
public void beforeDecoding(Response response)

Overrides default org.eclipse.jetty.client.ContentDecoder.beforeDecoding.

Doc from org.eclipse.jetty.client.ContentDecoder.beforeDecoding.

Processes the response just before the decoding of the response content.

Typical processing may involve modifying the response headers, for example by temporarily removing the Content-Length header, or modifying the Content-Encoding header.

Annotations
@Override
decodedChunkback to summary
protected boolean decodedChunk(RetainableByteBuffer chunk)

Overrides org.eclipse.jetty.http.GZIPContentDecoder.decodedChunk.

Doc from org.eclipse.jetty.http.GZIPContentDecoder.decodedChunk.

Called when a chunk of data is inflated.

The default implementation aggregates all the chunks into a single buffer returned from decode(ByteBuffer).

Derived implementations may choose to consume inflated chunks individually and return true from this method to prevent further inflation until a subsequent call to decode(ByteBuffer) or decodeChunks(ByteBuffer) is made.

Parameters
chunk:RetainableByteBuffer

the inflated chunk of data

Returns:boolean

false if inflating should continue, or true if the call to decodeChunks(ByteBuffer) or decode(ByteBuffer) should return, allowing to consume the inflated chunk and apply backpressure

Annotations
@Override
org.eclipse.jetty.client back to summary

public Class GZIPContentDecoder.Factory

extends Factory
Class Inheritance

Specialized ContentDecoder.Factory for the "gzip" encoding.

Field Summary

Modifier and TypeField and Description
private final int
private final ByteBufferPool

Constructor Summary

AccessConstructor and Description
public
public
Factory(int bufferSize)

public
Factory(ByteBufferPool byteBufferPool)

public
Factory(ByteBufferPool byteBufferPool, int bufferSize)

Method Summary

Modifier and TypeMethod and Description
public ContentDecoder
Inherited from org.eclipse.jetty.client.ContentDecoder.Factory:
equalsgetEncodinghashCode

Field Detail

bufferSizeback to summary
private final int bufferSize
byteBufferPoolback to summary
private final ByteBufferPool byteBufferPool

Constructor Detail

Factoryback to summary
public Factory()
Factoryback to summary
public Factory(int bufferSize)
Factoryback to summary
public Factory(ByteBufferPool byteBufferPool)
Factoryback to summary
public Factory(ByteBufferPool byteBufferPool, int bufferSize)

Method Detail

newContentDecoderback to summary
public ContentDecoder newContentDecoder()

Implements abstract org.eclipse.jetty.client.ContentDecoder.Factory.newContentDecoder.

Doc from org.eclipse.jetty.client.ContentDecoder.Factory.newContentDecoder.

Factory method for ContentDecoders

Returns:ContentDecoder

a new instance of a ContentDecoder

Annotations
@Override