|
||||||||
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 MJCReadable
public java.lang.String getReadableVersion()
getReadableVersion
in interface MJCReadable
public void setReader(MJCReader reader)
setReader
in interface MJCReadable
MJCReader
- reader: the MJCReader that will query data
from this objectpublic MJCReader getReader()
getReader
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 close() throws java.io.IOException
close
in class java.io.OutputStream
IOException:
- if something goes wrongpublic void flush() throws java.io.IOException
flush
in class java.io.OutputStream
IOException:
- if something goes wrongpublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
int
- b: the int to be writtenIOException:
- if something goes wrongpublic void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
byte[]
- b: the byte array to be writtenIOException:
- if something goes wrongpublic void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
byte[]
- 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 |