com.partnersoft.io
Class CompressionSwitchingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by com.partnersoft.io.CompressionSwitchingInputStream
All Implemented Interfaces:
java.io.Closeable

public class CompressionSwitchingInputStream
extends java.io.FilterInputStream

An input stream that turns on and off compression on the fly. Must be mated to a CompressionSwitchingOutputStream that has its compression switched at the right times to match.

Author:
Paul Reavis Copyright 2000 Partner Software, Inc.

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CompressionSwitchingInputStream(java.io.InputStream in)
           
 
Method Summary
 boolean isCompressing()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void setCompressing(boolean tizit)
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressionSwitchingInputStream

public CompressionSwitchingInputStream(java.io.InputStream in)
Method Detail

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

isCompressing

public boolean isCompressing()

setCompressing

public void setCompressing(boolean tizit)
                    throws java.io.IOException
Throws:
java.io.IOException