|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.io.OutputStream
|
+--com.monica.javacom.streams.MJCReadableIsAOS
Class for enabling to write to the MCJ layer hierarchy using the conventional OutputStream methods. Objects of this class act as OutputStreams, and they forward the data written on them to MJCReaders.
| Constructor Summary | |
MJCReadableIsAOS()
Default constructor. |
|
| Method Summary | |
void |
close()
This method closes the OuputStream. |
void |
flush()
Flushes the read buffer to the MJCReader. |
int |
getAvailable()
Returns the number of bytes that can be read from this MJCReader. |
java.lang.String |
getInput()
Returns the String that can be read from this MJCReader, this means the data that has been written to it as an OutputStream. |
java.lang.String |
getReadableName()
Returns the MJC name of the MJCReadable. |
java.lang.String |
getReadableVersion()
Returns the MJC version of the MJCReadable. |
MJCReader |
getReader()
Gets the MJCReader, which will query data from this object. |
boolean |
isReadableConnected()
Returns wether the it could be read from this object. |
void |
setReader(MJCReader reader)
Sets the MJCReader, which will query data from this object. |
void |
write(byte[] b)
Writes a byte array to the MJCReader. |
void |
write(byte[] b,
int off,
int len)
Writes a part (specified with start offset and length) of a byte array to the MJCReader. |
void |
write(int b)
Writes an int (0...255) to the MJCReader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MJCReadableIsAOS()
| Method Detail |
public java.lang.String getReadableName()
getReadableName in interface MJCReadablepublic java.lang.String getReadableVersion()
getReadableVersion in interface MJCReadablepublic void setReader(MJCReader reader)
setReader in interface MJCReadableMJCReader - reader: the MJCReader that will query data
from this objectpublic MJCReader getReader()
getReader in interface MJCReadablepublic int getAvailable()
getAvailable in interface MJCReadablepublic java.lang.String getInput()
getInput in interface MJCReadablepublic boolean isReadableConnected()
isReadableConnected in interface MJCReadable
public void close()
throws java.io.IOException
close in class java.io.OutputStreamIOException: - if something goes wrong
public void flush()
throws java.io.IOException
flush in class java.io.OutputStreamIOException: - if something goes wrong
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamint - b: the int to be writtenIOException: - if something goes wrong
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreambyte[] - b: the byte array to be writtenIOException: - if something goes wrong
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreambyte[] - b: the byte array to be writtenint - off: the starting offset of the partint - len: the length of the partIOException: - if something goes wrong
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||