org.freehep.util.io
Class DecodingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.freehep.util.io.DecodingInputStream
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ASCII85InputStream, ASCIIHexInputStream, Base64InputStream, ConditionalInputStream, DecompressableInputStream, RoutedInputStream, RunLengthInputStream

public abstract class DecodingInputStream
extends InputStream

Handles read by always throwing IOExceptions even in the middle of a read of an array. IMPORTANT: inherits from InputStream rather than FilterInputStream so that the correct read(byte[], int, int) method is used.

Author:
Mark Donszelmann (Mark.Donszelmann@gmail.com)

Constructor Summary
DecodingInputStream()
           
 
Method Summary
 int read(byte[] b, int off, int len)
          Overridden to make sure it ALWAYS throws an IOException while a problem occurs in read().
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecodingInputStream

public DecodingInputStream()
Method Detail

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overridden to make sure it ALWAYS throws an IOException while a problem occurs in read().

Overrides:
read in class InputStream
Throws:
IOException


Copyright © 2012. All Rights Reserved.