xmlBlaster 2.2.0 API

org.xmlBlaster.util.protocol
Class ZFlushInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.xmlBlaster.util.protocol.ZFlushInputStream
All Implemented Interfaces:
java.io.Closeable

public class ZFlushInputStream
extends java.io.FilterInputStream

Author:
Balázs Póka

Field Summary
private  byte[] buffer
           
private  byte[] compBuffer
           
private  int compReadIndex
           
private  int compWriteIndex
           
private  com.jcraft.jzlib.ZStream inflater
           
private  int maxReadIndex
           
private  int readIndex
           
static int RECBUFSIZE
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ZFlushInputStream(java.io.InputStream in)
           
 
Method Summary
 int available()
           
 float getCompressionRatio()
           
private  void inflateBuffer()
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
private  boolean readNextBuffer()
          This method is only called when the buffer is empty, otherwise bytes would be lost.
 
Methods inherited from class java.io.FilterInputStream
close, mark, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private byte[] buffer

compBuffer

private byte[] compBuffer

compWriteIndex

private int compWriteIndex

compReadIndex

private int compReadIndex

readIndex

private int readIndex

maxReadIndex

private int maxReadIndex

inflater

private com.jcraft.jzlib.ZStream inflater

RECBUFSIZE

public static final int RECBUFSIZE
See Also:
Constant Field Values
Constructor Detail

ZFlushInputStream

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

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.FilterInputStream

available

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

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)
         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

getCompressionRatio

public float getCompressionRatio()

readNextBuffer

private boolean readNextBuffer()
                        throws java.io.IOException
This method is only called when the buffer is empty, otherwise bytes would be lost.

Returns:
Throws:
java.io.IOException

inflateBuffer

private void inflateBuffer()
                    throws java.io.IOException
Throws:
java.io.IOException

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.