net.sf.fmj.apps.mediaserver
Class StreamDataSink

java.lang.Object
  extended by net.sf.fmj.media.AbstractDataSink
      extended by net.sf.fmj.apps.mediaserver.StreamDataSink
All Implemented Interfaces:
Controls, DataSink, MediaHandler

public class StreamDataSink
extends AbstractDataSink

Data sink that writes its output to an arbitrary OutputStream. Cannot be constructed by Manager, must be constructed explicitly, because the OutputStream must be specified on construction.

Author:
Ken Larson

Field Summary
 
Fields inherited from class net.sf.fmj.media.AbstractDataSink
outputLocator
 
Constructor Summary
StreamDataSink(java.io.OutputStream os)
           
 
Method Summary
 void close()
           
 java.lang.String getContentType()
           
 java.lang.Object getControl(java.lang.String controlType)
           
 java.lang.Object[] getControls()
           
 void open()
           
 void setSource(DataSource source)
           
 void start()
           
 void stop()
           
 
Methods inherited from class net.sf.fmj.media.AbstractDataSink
addDataSinkListener, getOutputLocator, notifyDataSinkListeners, removeDataSinkListener, setOutputLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamDataSink

public StreamDataSink(java.io.OutputStream os)
Method Detail

getControl

public java.lang.Object getControl(java.lang.String controlType)

getControls

public java.lang.Object[] getControls()

close

public void close()

getContentType

public java.lang.String getContentType()

open

public void open()
          throws java.io.IOException,
                 java.lang.SecurityException
Throws:
java.io.IOException
java.lang.SecurityException

start

public void start()
           throws java.io.IOException
Throws:
java.io.IOException

stop

public void stop()
          throws java.io.IOException
Throws:
java.io.IOException

setSource

public void setSource(DataSource source)
               throws java.io.IOException,
                      IncompatibleSourceException
Throws:
java.io.IOException
IncompatibleSourceException