InputDataStream (BEEP Core API)

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

## org.beepcore.beep.core
Class InputDataStream

    java.lang.Object
      |
      +--org.beepcore.beep.core.InputDataStream

public class InputDataStream
extends java.lang.Object

`InputDataStream` holds a stream of `BufferSegments`(s) and provides accessor methods to that stream.

Note that this implementation is not synchronized. If multiple threads access a `InputDataStream` concurrently, data may be inconsistent or lost.

See Also:
  `BufferSegment`

Method Summary
`int` | `available()`
`boolean` | `availableSegment()` Returns `true` if a `BufferSegment` is available to receive.
`void` | `close()` Indicates that the application is finished receiving data from this stream.
`InputDataStreamAdapter` | `getInputStream()` Returns an `InputStream` for reading the data in this stream.
`BufferSegment` | `getNextSegment()` Returns the next `BufferSegment` in this stream.
`boolean` | `isClosed()`
`boolean` | `isComplete()` Returns `true` if no more bytes will be added to those currently available on this stream.
`BufferSegment` | `waitForNextSegment()`

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

Method Detail

### available

    public int available()

### availableSegment

    public boolean availableSegment()

  Returns `true` if a `BufferSegment` is available to receive.

### close

    public void close()

  Indicates that the application is finished receiving data from this stream. If there is more data available the data will be discarded.

### getInputStream

    public InputDataStreamAdapter getInputStream()

  Returns an `InputStream` for reading the data in this stream.

### getNextSegment

    public BufferSegment getNextSegment()

  Returns the next `BufferSegment` in this stream.

### waitForNextSegment

    public BufferSegment waitForNextSegment()
                                     throws java.lang.InterruptedException

  Returns:
    null if isComplete() is true.
    `java.lang.InterruptedException`

### isClosed

    public boolean isClosed()

### isComplete

    public boolean isComplete()

  Returns `true` if no more bytes will be added to those currently available on this stream. Returns `false` if more bytes are expected.

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

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.