# Class StringReader

java.lang.Object
java.io.Reader
com.codename1.util.regex.StringReader

All Implemented Interfaces:
  `AutoCloseable`

public class StringReader extends Reader

- ## Field Summary

  ### Fields inherited from class Reader

  `lock`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringReader(String str)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Close the stream.
  `int`
  `read()`
  Read a single character.
  `int`
  `read(char[] cbuf, int off, int len)`
  Read characters into a portion of an array.
  `String`
  `readLine()`
  `boolean`
  `ready()`
  Tell whether this stream is ready to be read.

  ### Methods inherited from class Reader

  `mark, markSupported, read, reset, skip`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`