org.twdata.kokua
Class StreamSplitter

java.lang.Object
  extended by org.twdata.kokua.StreamSplitter
All Implemented Interfaces:
StreamFilter

public class StreamSplitter
extends java.lang.Object
implements StreamFilter

Description of the Class


Constructor Summary
StreamSplitter()
          Constructor for the StreamSplitter object
 
Method Summary
 void addStreamListener(StreamListener listener, boolean filtered)
           
 StreamFilter getFilterSource()
          Gets the filterSource attribute of the Terminal object
 void notifyStreamListeners(byte[] buffer)
          Notifies stream listeners of write
 void notifyStreamListeners(byte[] buffer, int len, boolean isWrite)
           
 int read(byte[] b)
          Description of the Method
 void removeStreamListener(StreamListener listener, boolean filtered)
           
 void setFilterSource(StreamFilter source)
          Sets the filterSource attribute of the StreamSplitter object
 int stripAnsi(byte[] b, byte[] c, int amount)
          Description of the Method
 void write(byte[] b)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamSplitter

public StreamSplitter()
Constructor for the StreamSplitter object

Parameters:
bus - Description of the Parameter
id - Description of the Parameter
Method Detail

notifyStreamListeners

public void notifyStreamListeners(byte[] buffer)
Notifies stream listeners of write


notifyStreamListeners

public void notifyStreamListeners(byte[] buffer,
                                  int len,
                                  boolean isWrite)

addStreamListener

public void addStreamListener(StreamListener listener,
                              boolean filtered)

removeStreamListener

public void removeStreamListener(StreamListener listener,
                                 boolean filtered)

setFilterSource

public void setFilterSource(StreamFilter source)
Sets the filterSource attribute of the StreamSplitter object

Specified by:
setFilterSource in interface StreamFilter
Parameters:
source - The new filterSource value

getFilterSource

public StreamFilter getFilterSource()
Gets the filterSource attribute of the Terminal object

Specified by:
getFilterSource in interface StreamFilter
Returns:
The filterSource value

read

public int read(byte[] b)
         throws java.io.IOException
Description of the Method

Specified by:
read in interface StreamFilter
Parameters:
b - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

stripAnsi

public int stripAnsi(byte[] b,
                     byte[] c,
                     int amount)
Description of the Method

Parameters:
b - Description of the Parameter
c - Description of the Parameter
amount - Description of the Parameter
Returns:
Description of the Return Value

write

public void write(byte[] b)
           throws java.io.IOException
Description of the Method

Specified by:
write in interface StreamFilter
Parameters:
b - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception