com.monica.javacom.streams
Class MJCWriterHasAIS

java.lang.Object
  |
  +--com.monica.javacom.streams.MJCWriterHasAIS
All Implemented Interfaces:
MJCWriter, java.lang.Runnable

public class MJCWriterHasAIS
extends java.lang.Object
implements MJCWriter, java.lang.Runnable

Class for creating a link between an InputStream and the MJC layer hierarchy. This class acts as a MJCWriter, this means it writes data read from the specified InputStream will be written to the MJCWriteable. Writing is not buffered. Reading from the InputStream happens in a different thread as in which the MJCWriterHasAIS has been constructed.


Constructor Summary
MJCWriterHasAIS(java.io.InputStream is)
          Constructor.
 
Method Summary
 MJCWriteable getWriteable()
          Returns the MJCWriteable to which data read from the InputStream will be written.
 java.lang.String getWriterName()
          Returns the MJC name of the MJCWriter.
 java.lang.String getWriterVersion()
          Returns the MJC version of the MJCWriter.
 void run()
          The entry point for the InputStream reader thread.
 void setWriteable(MJCWriteable writeable)
          Sets the MJCWriteable to which data read from the InputStream will be written.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MJCWriterHasAIS

public MJCWriterHasAIS(java.io.InputStream is)
Constructor. The InputStream to read from has to be specified.
Parameters:
InputStream - is: the InputStream to read from
Method Detail

getWriterName

public java.lang.String getWriterName()
Returns the MJC name of the MJCWriter.
Specified by:
getWriterName in interface MJCWriter
Returns:
String: the MJC name of the MJC writer

getWriterVersion

public java.lang.String getWriterVersion()
Returns the MJC version of the MJCWriter.
Specified by:
getWriterVersion in interface MJCWriter
Returns:
String: the MJC version of the MJCWriter

setWriteable

public void setWriteable(MJCWriteable writeable)
Sets the MJCWriteable to which data read from the InputStream will be written.
Specified by:
setWriteable in interface MJCWriter
Parameters:
MJCWriteable - writeable: the MJCWriteable to which data read from the InputStram will be written

getWriteable

public MJCWriteable getWriteable()
Returns the MJCWriteable to which data read from the InputStream will be written.
Specified by:
getWriteable in interface MJCWriter
Returns:
MJCWriteable: the MJCWriteable to which data read from the InputStream will be written

run

public void run()
The entry point for the InputStream reader thread.
Specified by:
run in interface java.lang.Runnable