epfl.io
Class VectorDemultiplexer

java.lang.Object
  |
  +--epfl.io.VectorDemultiplexer
Direct Known Subclasses:
P1VectorDemultiplexer, P6VectorDemultiplexer, VectorDemultiplexer2

public abstract class VectorDemultiplexer
extends java.lang.Object

A double vector demultiplexer. The input stream is redirected to a specific reader according to the classify method. Subclasses must override the classify method.


Constructor Summary
VectorDemultiplexer(VectorReader in, int nStreams)
          Creates a new demultiplexer on the underlying vector reader
 
Method Summary
 VectorReader getVectorReader(int index)
          Returns a reference on the given vector reader
 int nStreams()
          Returns the number of streams getting out
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorDemultiplexer

public VectorDemultiplexer(VectorReader in,
                           int nStreams)
Creates a new demultiplexer on the underlying vector reader
Parameters:
in - the underlying vector reader
nStreams - the number of streams getting out
Method Detail

getVectorReader

public VectorReader getVectorReader(int index)
Returns a reference on the given vector reader
Parameters:
index - 0..nStreams-1
Returns:
null if the stream is closed

nStreams

public int nStreams()
Returns the number of streams getting out