spoke.signal
Class ComplexPipedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by spoke.signal.ComplexPipedInputStream
All Implemented Interfaces:
java.io.Closeable, ComplexInput

public class ComplexPipedInputStream
extends java.io.InputStream
implements ComplexInput


Field Summary
protected  Complex[] buffer
           
protected  int in
           
protected  int out
           
protected static int PIPE_SIZE
           
 
Constructor Summary
ComplexPipedInputStream()
           
ComplexPipedInputStream(ComplexPipedOutputStream src)
           
 
Method Summary
 int available()
           
 void close()
           
 void connect(ComplexPipedOutputStream src)
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 Complex readComplex()
           
protected  void receive(Complex b)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PIPE_SIZE

protected static final int PIPE_SIZE
See Also:
Constant Field Values

buffer

protected Complex[] buffer

in

protected int in

out

protected int out
Constructor Detail

ComplexPipedInputStream

public ComplexPipedInputStream(ComplexPipedOutputStream src)
                        throws java.io.IOException
Throws:
java.io.IOException

ComplexPipedInputStream

public ComplexPipedInputStream()
Method Detail

connect

public void connect(ComplexPipedOutputStream src)
             throws java.io.IOException
Throws:
java.io.IOException

receive

protected void receive(Complex b)
                throws java.io.IOException
Throws:
java.io.IOException

read

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

readComplex

public Complex readComplex()
                    throws java.io.IOException
Specified by:
readComplex in interface ComplexInput
Throws:
java.io.IOException

read

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

available

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

close

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