gnu.io
クラス RXTXPort.SerialInputStream
java.lang.Object
java.io.InputStream
gnu.io.RXTXPort.SerialInputStream
- すべての実装されたインタフェース:
- java.io.Closeable
- 含まれているクラス:
- RXTXPort
class RXTXPort.SerialInputStream
- extends java.io.InputStream
Inner class for SerialInputStream
メソッドの概要 |
int |
available()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
int |
read(byte[] b,
int off,
int len,
byte[] t)
|
クラス java.io.InputStream から継承されたメソッド |
close, mark, markSupported, reset, skip |
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RXTXPort.SerialInputStream
RXTXPort.SerialInputStream()
read
public int read()
throws java.io.IOException
- 定義:
- クラス
java.io.InputStream
内の read
- 戻り値:
- int the int read
- 例外:
java.io.IOException
- 関連項目:
timeout threshold Behavior
------------------------------------------------------------------------
0 0 blocks until 1 byte is available timeout > 0,
threshold = 0, blocks until timeout occurs, returns -1
on timeout
>0 >0 blocks until timeout, returns - 1 on timeout, magnitude
of threshold doesn't play a role.
0 >0 Blocks until 1 byte, magnitude of threshold doesn't
play a role
read
public int read(byte[] b)
throws java.io.IOException
- オーバーライド:
- クラス
java.io.InputStream
内の read
- パラメータ:
b[]
-
- 戻り値:
- int number of bytes read
- 例外:
java.io.IOException
- timeout threshold Behavior
------------------------------------------------------------------------
0 0 blocks until 1 byte is available
>0 0 blocks until timeout occurs, returns 0 on timeout
>0 >0 blocks until timeout or reads threshold bytes,
returns 0 on timeout
0 >0 blocks until reads threshold bytes
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- オーバーライド:
- クラス
java.io.InputStream
内の read
- パラメータ:
b[]
- off
- len
-
- 戻り値:
- int number of bytes read
- 例外:
java.io.IOException
- timeout threshold Behavior
------------------------------------------------------------------------
0 0 blocks until 1 byte is available
>0 0 blocks until timeout occurs, returns 0 on timeout
>0 >0 blocks until timeout or reads threshold bytes,
returns 0 on timeout
0 >0 blocks until either threshold # of bytes or len bytes,
whichever was lower.
read
public int read(byte[] b,
int off,
int len,
byte[] t)
throws java.io.IOException
- パラメータ:
b[]
- off
- len
- t[]
-
- 戻り値:
- int number of bytes read
- 例外:
java.io.IOException
- We are trying to catch the terminator in the native code
Right now it is assumed that t[] is an array of 2 bytes.
if the read encounters the two bytes, it will return and the
array will contain the terminator. Otherwise read behavior should
be the same as read( b[], off, len ). Timeouts have not been well
tested.
available
public int available()
throws java.io.IOException
- オーバーライド:
- クラス
java.io.InputStream
内の available
- 戻り値:
- int bytes available
- 例外:
java.io.IOException