anon.proxy
Class DecompressionProxyCallback

java.lang.Object
  extended by anon.proxy.DecompressionProxyCallback
All Implemented Interfaces:
ProxyCallback

public class DecompressionProxyCallback
extends java.lang.Object
implements ProxyCallback

This class provides functionality for inflating zlib- or gzip-compressed content. Due to http header replacement the JonDo may specify some content-encodings which a client (i.e wget) does not support. In this case the JonDo decodes the content itself using this class. To use its functionality, an object of this class must be registered in the PoxyCallback-framework.

Author:
Simon Pecher

Field Summary
 
Fields inherited from interface anon.proxy.ProxyCallback
STATUS_DELAY, STATUS_FINISHED, STATUS_PROCESSABLE
 
Constructor Summary
DecompressionProxyCallback()
           
 
Method Summary
 void closeRequest(AnonProxyRequest anonRequest)
           
 int handleDownstreamChunk(AnonProxyRequest anonRequest, ProxyCallbackBuffer buffer)
           
 int handleUpstreamChunk(AnonProxyRequest anonRequest, ProxyCallbackBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecompressionProxyCallback

public DecompressionProxyCallback()
Method Detail

closeRequest

public void closeRequest(AnonProxyRequest anonRequest)
Specified by:
closeRequest in interface ProxyCallback

handleDownstreamChunk

public int handleDownstreamChunk(AnonProxyRequest anonRequest,
                                 ProxyCallbackBuffer buffer)
                          throws ProxyCallbackNotProcessableException
Specified by:
handleDownstreamChunk in interface ProxyCallback
Throws:
ProxyCallbackNotProcessableException

handleUpstreamChunk

public int handleUpstreamChunk(AnonProxyRequest anonRequest,
                               ProxyCallbackBuffer buffer)
                        throws ProxyCallbackNotProcessableException
Specified by:
handleUpstreamChunk in interface ProxyCallback
Throws:
ProxyCallbackNotProcessableException