Class TSDeCompInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by TSDeCompInputStream
All Implemented Interfaces:
java.io.Closeable

 class TSDeCompInputStream
extends java.io.FilterInputStream

.

======================================================================
 Class TSDeCompInputStream -- Decompress data while reading.
 Attention: This class replaces class 'InflaterInputStream', which
           provides a too small input-buffer. However, not all
           methods of the original class are also implemented within
           the replacement-class.
 ##TSDeCompInputStream (Eyecatcher)
======================================================================
 


Field Summary
private  byte[] buffer
           
private  java.util.zip.Inflater cInf
           
private  boolean closed
           
private  boolean eof
           
protected static java.lang.String IdStr
           
private  byte[] sglBuf
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
protected TSDeCompInputStream(java.io.InputStream IS)
          .
protected TSDeCompInputStream(java.io.InputStream IS, int bl)
          .
 
Method Summary
 void close()
          .
 int read()
          .
 int read(byte[] io, int off, int len)
          .
 int readSize(int sz, int sf)
          .
 
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IdStr

protected static final java.lang.String IdStr
See Also:
Constant Field Values

cInf

private java.util.zip.Inflater cInf

buffer

private volatile byte[] buffer

sglBuf

private volatile byte[] sglBuf

closed

private boolean closed

eof

private boolean eof
Constructor Detail

TSDeCompInputStream

protected TSDeCompInputStream(java.io.InputStream IS)
.
=====================================================================
 Constructor: (1) Create Default-Entry
=====================================================================
  


TSDeCompInputStream

protected TSDeCompInputStream(java.io.InputStream IS,
                              int bl)
.
=====================================================================
 Constructor: (2) Create Standard-Entry
=====================================================================
  

Method Detail

close

public void close()
           throws java.io.IOException
.
=====================================================================
 Method "close"
 Closes this input stream and releases any system resources
   associated with the stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterInputStream
Throws:
java.io.IOException - if an I/O error has occurred ##close.TSDeCompInputStream (Eyecatcher) =====================================================================

read

public int read()
         throws java.io.IOException
.
=====================================================================
 Method "read"
 Return single uncompressed byte from input.

Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException - if an I/O error has occurred ##read.TSDeCompInputStream (Eyecatcher) =====================================================================

read

public int read(byte[] io,
                int off,
                int len)
         throws java.io.IOException
.
=====================================================================
 Method "read"
 Reads uncompressed data into an array of bytes

Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException - if an I/O error has occurred ##read.TSDeCompInputStream (Eyecatcher) =====================================================================

readSize

public int readSize(int sz,
                    int sf)
.
=====================================================================
 Method "readSize"
 Change size of internal buffer, which is used for providing
   data to the Inflater.
 The internal buffersize is computed according to:
   - Select integer n from (1..30) so that 2**n > (sz/sf) >= 2**(n-1)
   - Use max(2**n, 512) as internal buffersize.
 ##readSize.TSDeCompInputStream (Eyecatcher)
=====================================================================