public class GZipFilter extends BaseFilter
Filter
which
encodes/decodes data in the GZIP format.Constructor and Description |
---|
GZipFilter()
Construct GZipFilter using default buffer sizes.
|
GZipFilter(int inBufferSize,
int outBufferSize)
Construct GZipFilter using specific buffer sizes.
|
Modifier and Type | Method and Description |
---|---|
NextAction |
handleClose(FilterChainContext ctx)
Method perform the clean up of GZIP encoding/decoding state on a closed
Connection . |
NextAction |
handleRead(FilterChainContext ctx)
Method decodes GZIP encoded data stored in
FilterChainContext.getMessage() and,
as the result, produces a Buffer with a plain data. |
NextAction |
handleWrite(FilterChainContext ctx)
Method compresses plain data stored in
FilterChainContext.getMessage() and,
as the result, produces a Buffer with a GZIP compressed data. |
createContext, exceptionOccurred, handleAccept, handleConnect, handleEvent, onAdded, onFilterChainChanged, onRemoved
public GZipFilter()
public GZipFilter(int inBufferSize, int outBufferSize)
inBufferSize
- input buffer sizeoutBufferSize
- output buffer sizepublic NextAction handleClose(FilterChainContext ctx) throws IOException
Connection
.handleClose
in interface Filter
handleClose
in class BaseFilter
ctx
- Context of FilterChainContext
processing.IOException
public NextAction handleRead(FilterChainContext ctx) throws IOException
FilterChainContext.getMessage()
and,
as the result, produces a Buffer
with a plain data.handleRead
in interface Filter
handleRead
in class BaseFilter
ctx
- Context of FilterChainContext
processing.IOException
public NextAction handleWrite(FilterChainContext ctx) throws IOException
FilterChainContext.getMessage()
and,
as the result, produces a Buffer
with a GZIP compressed data.handleWrite
in interface Filter
handleWrite
in class BaseFilter
ctx
- Context of FilterChainContext
processing.IOException
Copyright © 2014 Oracle Corporation. All rights reserved.