Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.core.io.util
Class InputStreamDecorator

java.lang.Object
  extended by java.io.InputStream
      extended by eu.esdihumboldt.hale.common.core.io.util.InputStreamDecorator
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
DebugInputStream

public class InputStreamDecorator
extends InputStream

Decorator on an InputStream. Alternative to FilterInputStream that calls the same methods on the decoratee that were actually called.

Author:
Simon Templer

Constructor Summary
InputStreamDecorator(InputStream in)
          Creates a decorator for the given input stream
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputStreamDecorator

public InputStreamDecorator(InputStream in)
Creates a decorator for the given input stream

Parameters:
in - the input stream to decorate
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException
See Also:
InputStream.available()

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException
See Also:
InputStream.close()

mark

public void mark(int readLimit)
Overrides:
mark in class InputStream
See Also:
InputStream.mark(int)

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream
See Also:
InputStream.markSupported()

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read(byte[], int, int)

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException
See Also:
InputStream.read(byte[])

reset

public void reset()
           throws IOException
Overrides:
reset in class InputStream
Throws:
IOException
See Also:
InputStream.reset()

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException
See Also:
InputStream.skip(long)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d