Class JTextAreaStreamReader

java.lang.Object
net.hironico.common.swing.JTextAreaStreamReader
All Implemented Interfaces:
Consumer<Void>

public class JTextAreaStreamReader extends Object implements Consumer<Void>
This is a stream reader to put LIVE data read from the stream into a JTextArea. This is a non blocking reader meaning the data is read in a separeated thread every 250 milliseconds.
  • Constructor Details

    • JTextAreaStreamReader

      public JTextAreaStreamReader(InputStream srcInputStream, JTextArea txtTarget)
    • JTextAreaStreamReader

      public JTextAreaStreamReader(InputStream srcInputStream, JTextArea txtTarget, int maxRows)
  • Method Details

    • die

      public void die() throws IOException
      Throws:
      IOException
    • setMaxRows

      public void setMaxRows(int maxRows)
    • checkMaxRows

      protected void checkMaxRows()
    • accept

      public void accept(Void v)
      Specified by:
      accept in interface Consumer<Void>