|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
josx.rcxcomm.RCXInputStream
RCXInputStream provides an interface similar to FileInputStream. It is a cut down version of RCXPort, which provides just read access. Adapted from original code created by the LEGO3 Team at DTU-IAU
Field Summary | |
static int |
DEFAULT_BUFFER_SIZE
The default buffer size for the InputStream is 32 bytes |
static int |
DEFAULT_TIMEOUT
|
Constructor Summary | |
RCXInputStream()
Creates new RCXInputStream |
Method Summary | |
int |
available()
Checks if there is any data avaliable on the InputStream |
void |
close()
Close the stream and stop listening |
int |
read()
Read a single byte from the InputStream. |
void |
setTimeOut(int timeout)
Setter for timeout |
Methods inherited from class java.io.InputStream |
mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_TIMEOUT
Constructor Detail |
public RCXInputStream()
Method Detail |
public void setTimeOut(int timeout)
timeout
- the timeoutpublic int available() throws IOException
available
in class InputStream
IOException
- is never thrownpublic int read() throws IOException
read
in class InputStream
IOException
- is thrown when the read is timed outpublic void close()
close
in class InputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |