|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.monica.javacom.streams.MJCReadableHasAIS
Class for creating a link between an InputStream and the MJC layer hierarchy. This class acts as a MJCReadable, this means it reads data from the specified InputStream and then forwards it to the MJCReader through the readEvent mechanism. Reading is buffered. Reading fromt the InputStream happens in a different thread as in which the MJCReadableHasAIS has been constructed.
Constructor Summary | |
MJCReadableHasAIS(java.io.InputStream is)
Constructor. |
Method Summary | |
int |
getAvailable()
Returns the number of bytes that can be read from this object. |
java.lang.String |
getInput()
Returns the contents of the read buffer. |
java.lang.String |
getReadableName()
Returns the MJC name of the MJCReadable. |
java.lang.String |
getReadableVersion()
Returns the MJC version of the MJCReadable. |
MJCReader |
getReader()
Returns the MJCReader to which the readEvents will be sent. |
boolean |
isReadableConnected()
Returns wether the InputStream is still connected or the stream has reached an end. |
void |
run()
Entry point for the InputStream reader thread. |
void |
setReader(MJCReader reader)
Sets the MJCReader to which the readEvents has to be sent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MJCReadableHasAIS(java.io.InputStream is)
InputStream
- is: the InputStream to read fromMethod Detail |
public java.lang.String getReadableName()
getReadableName
in interface MJCReadable
public java.lang.String getReadableVersion()
getReadableVersion
in interface MJCReadable
public int getAvailable()
getAvailable
in interface MJCReadable
public java.lang.String getInput()
getInput
in interface MJCReadable
public boolean isReadableConnected()
isReadableConnected
in interface MJCReadable
public void setReader(MJCReader reader)
setReader
in interface MJCReadable
MJCReader
- reader: the MJCReader to which the readEvents
have to be sentpublic MJCReader getReader()
getReader
in interface MJCReadable
public void run()
run
in interface java.lang.Runnable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |