sam.io
Class ParallelIO.ScatterInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--sam.io.ParallelIO.ScatterInputStream
Enclosing class:
ParallelIO

public class ParallelIO.ScatterInputStream
extends java.io.InputStream

Class for scattering buffered reads accross multiple threads.

See Also:
ParallelIO.GatherInputStream

Constructor Summary
ParallelIO.ScatterInputStream(java.io.InputStream delegee, sam.toolkit.Workshop workshop)
           
 
Method Summary
 void close()
          Simply forwards the closing call to the underlying stream
 int read()
          Simply reads one byte from the underlying stream
 int read(byte[] data, int begin, int length)
          Scatters reads on multiple threads from the underlying stream
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelIO.ScatterInputStream

public ParallelIO.ScatterInputStream(java.io.InputStream delegee,
                                     sam.toolkit.Workshop workshop)
Method Detail

close

public void close()
           throws java.io.IOException
Simply forwards the closing call to the underlying stream

Overrides:
close in class java.io.InputStream
java.io.IOException

read

public int read()
         throws java.io.IOException
Simply reads one byte from the underlying stream

Specified by:
read in class java.io.InputStream
java.io.IOException

read

public int read(byte[] data,
                int begin,
                int length)
         throws java.io.IOException
Scatters reads on multiple threads from the underlying stream

Overrides:
read in class java.io.InputStream
java.io.IOException