Class StringReader

java.lang.Object
java.io.Reader
com.codename1.util.regex.StringReader
All Implemented Interfaces:
AutoCloseable

public class StringReader extends Reader
  • Constructor Details

    • StringReader

      public StringReader(String str)
  • Method Details

    • read

      public int read()
      Description copied from class: Reader
      Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
      Overrides:
      read in class Reader
    • read

      public int read(char[] cbuf, int off, int len)
      Description copied from class: Reader
      Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
      Specified by:
      read in class Reader
    • close

      public void close()
      Description copied from class: Reader
      Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in class Reader
    • readLine

      public String readLine()
    • ready

      public boolean ready()
      Description copied from class: Reader
      Tell whether this stream is ready to be read.
      Overrides:
      ready in class Reader