Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lejos.pc.comm
Class NXTCommInputStream

    java.lang.Object
      java.io.InputStream
          lejos.pc.comm.NXTCommInputStream

All Implemented Interfaces:
  java.io.Closeable

    public class NXTCommInputStream

extends java.io.InputStream

Implementation of InputStream over NXTComm using Bluetooth.

Constructor Summary
`NXTCommInputStream(NXTComm nxtComm)`

Method Summary
`int` | `available()` returns the number of bytes in the input buffer - can be read without blocking
`void` | `close()` Close the stream
`int` | `read()` Returns one byte as an integer between 0 and 255.

Methods inherited from class java.io.InputStream
`mark, markSupported, read, read, reset, skip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NXTCommInputStream

    public NXTCommInputStream(NXTComm nxtComm)

Method Detail

### read

    public int read()
             throws java.io.IOException

  Returns one byte as an integer between 0 and 255. Returns -1 if the end of the stream is reached. Does not return till some bytes are available.

  Specified by:
    `read` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### available

    public int available()
                  throws java.io.IOException

  returns the number of bytes in the input buffer - can be read without blocking

  Overrides:
    `available` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Close the stream

  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `java.io.InputStream`
  Throws:
    `java.io.IOException`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD