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

## waba.io
Class Stream

    java.lang.Object
      |
      +--waba.io.Stream

Direct Known Subclasses:
  BufferStream, ByteArrayStream, Catalog, DataStream, ResizeStream, SerialPort, Socket

public abstract class Stream
extends Object

Stream is the base class for all stream-based I/O classes.

Constructor Summary
`Stream()`

Method Summary
`abstract boolean` | `close()` Closes the stream.
`abstract boolean` | `isOpen()` Returns true if this Stream is open and false otherwise
`abstract int` | `readBytes(byte[] buf, int start, int count)` Reads bytes from the stream.
`abstract int` | `writeBytes(byte[] buf, int start, int count)` Writes bytes to the stream.

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

Constructor Detail

### Stream

    public Stream()

Method Detail

### readBytes

    public abstract int readBytes(byte[] buf,
                                  int start,
                                  int count)

  Reads bytes from the stream. Returns the number of bytes actually read or -1 if an error prevented the read operation from occurring.
  Parameters:
    `buf` - the byte array to read data into
    `start` - the start position in the array
    `count` - the number of bytes to read

### writeBytes

    public abstract int writeBytes(byte[] buf,
                                   int start,
                                   int count)

  Writes bytes to the stream. Returns the number of bytes actually written or -1 if an error prevented the write operation from occurring.
  Parameters:
    `buf` - the byte array to write data from
    `start` - the start position in the byte array
    `count` - the number of bytes to write

### close

    public abstract boolean close()

  Closes the stream. Returns true if the operation is successful and false otherwise.

### isOpen

    public abstract boolean isOpen()

  Returns true if this Stream is open and false otherwise

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