|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
com.dalsemi.comm.SerialInputStream
A Serial input stream is an input stream for reading data from an serial port.
| Method Summary | |
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
void |
close()
Closes this Serial input stream and releases any system resources associated with the stream. |
protected void |
disableReceiveThreshold()
|
protected void |
disableReceiveTimeout()
|
protected void |
enableReceiveThreshold(int thresh)
|
protected void |
enableReceiveTimeout(int thresh)
|
protected int |
getReceiveThreshold()
|
protected int |
getReceiveTimeout()
|
protected boolean |
isReceiveThresholdEnabled()
|
protected boolean |
isReceiveTimeoutEnabled()
|
protected void |
open()
Opens the Serial input stream for reading. |
int |
read()
Reads the next byte of data from this input stream. |
int |
read(byte[] barr,
int offset,
int len)
Reads the number of bytes requested from this input stream. |
| Methods inherited from class java.io.InputStream |
mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
protected void open()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public int read()
throws java.io.IOException
int in the range
0 to 255. If no byte is available
because the end of the stream has been reached, the value
-1 is returned. This method blocks until input data
is available, the end of the stream is detected, or an exception
is thrown.
-1 if the end of the
stream is reached.
java.io.IOException - if an I/O error occurs.
public int read(byte[] barr,
int offset,
int len)
throws java.io.IOException
-1 is returned. This method blocks until input data
is available, the end of the stream is detected, or an exception
is thrown.
barr - the array to be filled.offset - the offset to begin writting in the array.len - the number of bytes requested.
-1 if the end of the stream
has been reached.
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public int available()
throws java.io.IOException
InputStream returns 0. This method
should be overridden by subclasses.
java.io.IOException - if an I/O error occurs.
protected void enableReceiveThreshold(int thresh)
throws javax.comm.UnsupportedCommOperationException
javax.comm.UnsupportedCommOperationExceptionprotected int getReceiveThreshold()
protected void disableReceiveThreshold()
protected boolean isReceiveThresholdEnabled()
protected void enableReceiveTimeout(int thresh)
throws javax.comm.UnsupportedCommOperationException
javax.comm.UnsupportedCommOperationExceptionprotected int getReceiveTimeout()
protected void disableReceiveTimeout()
protected boolean isReceiveTimeoutEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||