com.tagtraum.perf.io
Class HuffmanInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--com.tagtraum.perf.io.HuffmanInputStream

public class HuffmanInputStream
extends java.io.FilterInputStream

Implementation of a HuffmanInputStream. Note that this implementation is not optimized.

Version:
$Id: $
Author:
Hendrik Schreiber
See Also:
HuffmanOutputStream, HuffmanTree

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

Constructor Detail

HuffmanInputStream

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

read

public int read()
         throws java.io.IOException,
                HuffmanException
Overrides:
read in class java.io.FilterInputStream
Throws:
HuffmanException - if the stream is corrupted and cannot be decoded properly. This might be the case if the stream was not able to read a complete block.
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException,
                HuffmanException
Overrides:
read in class java.io.FilterInputStream
Throws:
HuffmanException - if the stream is corrupted and cannot be decoded properly. This might be the case if the stream was not able to read a complete block.
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.FilterInputStream
java.io.IOException

markSupported

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

mark

public void mark(int readlimit)
Overrides:
mark in class java.io.FilterInputStream

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.FilterInputStream
java.io.IOException

available

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


Copyright © 2002 Hendrik Schreiber
http://www.tagtraum.com/performance/
This software can be distributed under LGPL