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

## UI.Run
Class GEVAStreamReader.Event

    java.lang.Object
      UI.Run.GEVAStreamReader.Event

Enclosing class:
  GEVAStreamReader

    public static class GEVAStreamReader.Event

extends java.lang.Object

Event data for stream reading listeners

Constructor Summary
`GEVAStreamReader.Event(java.lang.String line, int streamId)` Create an event which is a line read from the stream plus the id of the stream read from (ID_STD_OUT or ID_ERR_OUT)

Method Summary
`java.lang.String` | `getLine()` Get the line read from the stream.
`int` | `getStreamId()` Get the id of the stream that the line was read from, either ID_STD_OUT or ID_ERR_OUT
`boolean` | `isEndOfStream()` Returns true when the event has been generated because the stream ended.

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

Constructor Detail

### GEVAStreamReader.Event

    public GEVAStreamReader.Event(java.lang.String line,
                                  int streamId)

  Create an event which is a line read from the stream plus the id of the stream read from (ID_STD_OUT or ID_ERR_OUT)

  Parameters:
    `line` - The line read or null if the end of stream has been reached

Method Detail

### getLine

    public java.lang.String getLine()

  Get the line read from the stream. If the end-of-stream has been reached, this will return null - however, this should not be used to test for an end-of-stream, as other listeners are free to modify the line data (see LISTENERS_TALK_TODO) and they may set it to null. To correctly test for end-of-stream, call isEndOfStream, which should be called first by any listener to decide whether it needs to continue

### getStreamId

    public int getStreamId()

  Get the id of the stream that the line was read from, either ID_STD_OUT or ID_ERR_OUT

### isEndOfStream

    public boolean isEndOfStream()

  Returns true when the event has been generated because the stream ended. This will happen when either the process finished normally, it crashed, or even, if just reading the stream failed and can no longer be read. Basically, when it's determined that no more events will be generated by this stream again.

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