local.media
Class SplitterLine

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--local.media.SplitterLine

public class SplitterLine
extends java.io.OutputStream

SplitterLine is a simple splitter with one input line (the SplitterLine itself) and N output lines (OutputStreams).

Each output line has an identifier (Object) used as key when adding or removing the line.


Constructor Summary
SplitterLine(java.lang.Object splitter_id)
          Creates a new SplitterLine.
SplitterLine(java.lang.Object splitter_id, java.util.Hashtable output_lines)
          Creates a new SplitterLine.
 
Method Summary
 void addLine(java.lang.Object id, java.io.OutputStream os)
          Adds a new line.
 void close()
          Closes this output stream and releases any system resources associated with this stream.
 void flush()
          Flushes this output stream and forces any buffered output bytes to be written out.
 void removeLine(java.lang.Object id)
          Removes a line.
 void write(byte[] b)
          Writes b.length bytes from the specified byte array to this output stream.
 void write(byte[] b, int off, int len)
          Writes len bytes from the specified byte array starting at offset off to this output stream.
 void write(int b)
          Writes the specified byte to this output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitterLine

public SplitterLine(java.lang.Object splitter_id)
Creates a new SplitterLine.

SplitterLine

public SplitterLine(java.lang.Object splitter_id,
                    java.util.Hashtable output_lines)
Creates a new SplitterLine.
Method Detail

addLine

public void addLine(java.lang.Object id,
                    java.io.OutputStream os)
Adds a new line.

removeLine

public void removeLine(java.lang.Object id)
Removes a line.

close

public void close()
           throws java.io.IOException
Closes this output stream and releases any system resources associated with this stream.
Overrides:
close in class java.io.OutputStream

flush

public void flush()
           throws java.io.IOException
Flushes this output stream and forces any buffered output bytes to be written out.
Overrides:
flush in class java.io.OutputStream

write

public void write(byte[] b)
           throws java.io.IOException
Writes b.length bytes from the specified byte array to this output stream.
Overrides:
write in class java.io.OutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Writes len bytes from the specified byte array starting at offset off to this output stream.
Overrides:
write in class java.io.OutputStream

write

public void write(int b)
           throws java.io.IOException
Writes the specified byte to this output stream.
Overrides:
write in class java.io.OutputStream