|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.mozilla.jrex.io.JRexInputStream
JRexInputStream is java wrapper arround native nsIInputStream.
Constructor Summary | |
JRexInputStream(long streamPeer)
Creates a JRexInputStream given peer stream handle. |
Method Summary | |
int |
available()
Returns the number of bytes that can be read from this native inputstream without blocking. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
protected void |
finalize()
Ensures that the close method of this input stream is
called when there are no more references to it. |
void |
mark(int readlimit)
Mark is not supported, hence this function does nothing. |
boolean |
markSupported()
Mark is not supported. |
int |
read()
Reads a byte of data from this input stream. |
int |
read(byte[] buff)
Reads up to b.length bytes of data from this input
stream into an array of bytes. |
int |
read(byte[] buff,
int off,
int len)
Reads up to buff.length bytes of data from this input
stream into an array of bytes. |
void |
reset()
Since mark is not supported, this throws IOException. |
long |
skip(long n)
skip is not supported, hence return -1 . |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JRexInputStream(long streamPeer) throws JRexException
JRexInputStream
given peer stream handle.
streamPeer
- handle to the native nsIInputStream instance
JRexException
- if streamPeer
is invalid.Method Detail |
public int available() throws IOException
IOException
- if an I/O error or JRexException occurs.public int read() throws IOException
-1
if the end of the stream is reached.
IOException
- if an I/O error or JRexException occurs.public int read(byte[] buff, int off, int len) throws IOException
buff.length
bytes of data from this input
stream into an array of bytes. This method blocks until some input
is available.
buff
- the buffer into which the data is read.
-1
if there is no more data because the end of
the stream has been reached.
IOException
- if an I/O error or JRexException occurs.public int read(byte[] buff) throws IOException
b.length
bytes of data from this input
stream into an array of bytes. This method blocks until some input
is available.
buff
- the buffer into which the data is read.
-1
if there is no more data because the end of
the stream has been reached.
IOException
- if an I/O error or JRexException occurs.public void mark(int readlimit)
public void reset() throws IOException
IOException
public long skip(long n) throws IOException
-1
.
IOException
public boolean markSupported()
public void close() throws IOException
IOException
- if an I/O error or JRexException occurs.protected void finalize() throws IOException
close
method of this input stream is
called when there are no more references to it.
IOException
close()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |