epfl.io
Class VectorUnionReader

java.lang.Object
  |
  +--epfl.io.VectorUnionReader
All Implemented Interfaces:
VectorReader

public class VectorUnionReader
extends java.lang.Object
implements VectorReader

A stream which is the union from a set of streams


Constructor Summary
VectorUnionReader(VectorReader[] readers)
          Creates a new union vector reader on the underlying set of streams
 
Method Summary
 void close()
          Closes the stream
 int period()
          Returns the stream period
 double[] read()
          Reads a vector in stream
 int size()
          Returns the stream size (vector size)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorUnionReader

public VectorUnionReader(VectorReader[] readers)
Creates a new union vector reader on the underlying set of streams
Method Detail

read

public double[] read()
              throws java.io.IOException
Reads a vector in stream
Specified by:
read in interface VectorReader
Throws:
java.io.IOException - if the stream is closed or if it is unable to read size doubles

size

public int size()
Returns the stream size (vector size)
Specified by:
size in interface VectorReader

close

public void close()
           throws java.io.IOException
Closes the stream
Specified by:
close in interface VectorReader
Throws:
java.io.IOException - if an IO error occurs

period

public int period()
Returns the stream period
Specified by:
period in interface VectorReader
Following copied from interface: epfl.io.VectorReader
Returns:
0 if the stream is not periodic