Package jadex.common

Class ListenableStream

java.lang.Object
java.io.OutputStream
jadex.common.ListenableStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ListenableStream extends OutputStream
A stream that can be listened to.
  • Field Details

    • out

      protected OutputStream out
      The super output stream.
    • type

      protected String type
      The event type to be generated.
    • buffer

      protected byte[] buffer
      The buffered bytes.
    • len

      protected int len
      The currently used length of the buffer.
    • listeners

      protected List listeners
      The listeners.
    • newline

      protected byte[] newline
      The code(s) of the newline character.
  • Constructor Details

    • ListenableStream

      public ListenableStream(OutputStream out, String type)
      Create a new stream.
      Parameters:
      out - The output stream.
  • Method Details