CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.net
Class CompressionFilter

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.CompressionFilter
All Implemented Interfaces:
WrapperStreamFactory, XmlConfigurable

public class CompressionFilter
extends Base
implements WrapperStreamFactory, XmlConfigurable

Provides a compression wrapper for an InputStream and OutputStream.

Author:
cp 2002.08.20

Nested Class Summary
static class CompressionFilter.DeflaterOutputShell
          DeflaterOutputShell enforces the "end" call for the corresponding Deflater object.
static class CompressionFilter.InflaterInputShell
          InflaterInputShell enforces the "end" call for the corresponding Inflater object.
 
Constructor Summary
CompressionFilter()
           
 
Method Summary
 XmlElement getConfig()
          Determine the current configuration of the object.
 InputStream getInputStream(InputStream stream)
          Requests an InputStream that wraps the passed InputStream.
 OutputStream getOutputStream(OutputStream stream)
          Requests an OutputStream that wraps the passed OutputStream.
 void setConfig(XmlElement xml)
          Specify the configuration for the object.
 

Constructor Detail

CompressionFilter

public CompressionFilter()
Method Detail

getInputStream

public InputStream getInputStream(InputStream stream)
Requests an InputStream that wraps the passed InputStream.

Specified by:
getInputStream in interface WrapperStreamFactory
Parameters:
stream - the java.io.InputStream to be wrapped
Returns:
an InputStream that delegates to ("wraps") the passed InputStream

getOutputStream

public OutputStream getOutputStream(OutputStream stream)
Requests an OutputStream that wraps the passed OutputStream.

Specified by:
getOutputStream in interface WrapperStreamFactory
Parameters:
stream - the java.io.OutputStream to be wrapped
Returns:
an OutputStream that delegates to ("wraps") the passed OutputStream

getConfig

public XmlElement getConfig()
Determine the current configuration of the object.

Specified by:
getConfig in interface XmlConfigurable
Returns:
the XML configuration or null

setConfig

public void setConfig(XmlElement xml)
Specify the configuration for the object.

Specified by:
setConfig in interface XmlConfigurable
Parameters:
xml - the XML configuration for the object
Throws:
IllegalStateException - if the object is not in a state that allows the configuration to be set; for example, if the object has already been configured and cannot be reconfigured

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation