|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--com.monica.javacom.streams.MJCWriteableIsAIS
Class for enabling to read from the MJC layer hierarchy using the conventional InputStream methods. Objects of this class act as InputStreams, the data readable from the InputStream will be generated by the MJCWriter corresponding to this MJCWriteable.
Constructor Summary | |
MJCWriteableIsAIS()
Default constructor. |
Method Summary | |
int |
available()
Returns the number of bytes that are currently available for reading from the stream. |
void |
close()
Closes the InputStream. |
void |
flush()
MJCWriteableIsAIS does not implement the flush method, because it cannot be ensured that after flush() the contents of the buffer will be read from the InputStream. |
java.lang.String |
getLastWriteableError()
Returns the last error that occured during the write methods. |
java.lang.String |
getWriteableName()
Returns the MJC name of the MJCWriteable. |
java.lang.String |
getWriteableVersion()
Returns the MJC version of the MJCWriteable. |
boolean |
isWriteableConnected()
Returns wether the InputStream is still open. |
void |
mark(int readlimit)
MJCWriteableIsAIS does not support mark/reset. |
boolean |
markSupported()
MJCWriteableIsAIS does not support mark/reset. |
int |
read()
Reads 1 single byte from the stream. |
int |
read(byte[] b)
Reads b.length bytes from the stream. |
int |
read(byte[] b,
int off,
int len)
Reads len bytes from the stream. |
void |
reset()
MJCWriteableIsAIS does not support mark/reset. |
long |
skip(long n)
Skips n bytes in the stream. |
boolean |
write(char c)
Writes one single char to the stream. |
boolean |
write(char[] c)
Writes a char array to the stream. |
boolean |
write(java.lang.String s)
Writes a String to the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MJCWriteableIsAIS()
Method Detail |
public java.lang.String getWriteableName()
getWriteableName
in interface MJCWriteable
public java.lang.String getWriteableVersion()
getWriteableVersion
in interface MJCWriteable
public boolean write(char c)
write
in interface MJCWriteable
char
- c: the char to be written to the streampublic boolean write(java.lang.String s)
write
in interface MJCWriteable
String
- s: the String to be written to the streampublic boolean write(char[] c)
write
in interface MJCWriteable
char[]
- c: the char array to be written to the streampublic void flush()
flush
in interface MJCWriteable
public java.lang.String getLastWriteableError()
getLastWriteableError
in interface MJCWriteable
public boolean isWriteableConnected()
isWriteableConnected
in interface MJCWriteable
public int read() throws java.io.IOException
read
in class java.io.InputStream
IOException:
- if the InputStream has been closedpublic int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
byte[]
- b: the byte array into the data will be readIOException:
- if the InputStream has been closedpublic int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
byte[]
- b: the byte array into the data will be readint
- off: the beginning offset from which the bytes will
be written into b (inclusive)int
- len: the number of bytes to be readIOException:
- if the InputStream has been closedIndexOutOfBoundsException:
- if (b.length<(off+len))public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
long
- n: number of bytes to be skippedIOException:
- if the InputStream has been closedpublic int available() throws java.io.IOException
available
in class java.io.InputStream
IOException:
- if the InputStream has been closedpublic void close() throws java.io.IOException
close
in class java.io.InputStream
IOException:
- if the InputStream has been closedpublic void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
IOException:
- MJCWriteableIsAIS does not support mark/resetpublic boolean markSupported()
markSupported
in class java.io.InputStream
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |