to.etc.util
Class ByteBufferInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by to.etc.util.ByteBufferInputStream
All Implemented Interfaces:
java.io.Closeable

public class ByteBufferInputStream
extends java.io.InputStream

This is a utility class that implements an input stream which retrieves it's data from an array of byte arrays. Each byte array contains part of the data, and the sum of all data in the arrays is the total data in the set.

Author:
Frits Jalvingh

Constructor Summary
ByteBufferInputStream(byte[][] data)
           
 
Method Summary
 int available()
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] parm1)
           
 int read(byte[] odata, int ooff, int osz)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
close, mark
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferInputStream

public ByteBufferInputStream(byte[][] data)
Method Detail

skip

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

read

public int read(byte[] parm1)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

reset

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

markSupported

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

available

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

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] odata,
                int ooff,
                int osz)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException