Class TerminatedStringReader

java.lang.Object
com.c1games.terminal.algo.io.TerminatedStringReader
All Implemented Interfaces:
java.lang.AutoCloseable

public class TerminatedStringReader
extends java.lang.Object
implements java.lang.AutoCloseable
A reader of framed strings from an inputstream.
  • Constructor Summary

    Constructors 
    Constructor Description
    TerminatedStringReader​(java.io.InputStream in, char terminator)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String await()
    Blocking, non-nullable.
    java.lang.String awaitTimeout​(long timeout)
    Nullable, blocking, timeouts.
    void close()  
    java.lang.String receive()
    Nullable, non-blocking.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • receive

      public java.lang.String receive() throws java.io.IOException
      Nullable, non-blocking.
      Throws:
      java.io.IOException
    • await

      public java.lang.String await() throws java.io.IOException
      Blocking, non-nullable.
      Throws:
      java.io.IOException
    • awaitTimeout

      public java.lang.String awaitTimeout​(long timeout) throws java.io.IOException
      Nullable, blocking, timeouts.
      Throws:
      java.io.IOException
    • close

      public void close() throws java.lang.Exception
      Specified by:
      close in interface java.lang.AutoCloseable
      Throws:
      java.lang.Exception