Class SourceStringReader

  • All Implemented Interfaces:, java.lang.AutoCloseable, java.lang.Readable

    public class SourceStringReader
    Extension to StringReader that allows the original string to be recovered.
    • Field Summary

      Modifier and Type Field Description
      private java.lang.String s  
      • Fields inherited from class

    • Constructor Summary

      Constructor Description
      SourceStringReader​(java.lang.String s)
      Creates a source string reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSourceString()
      Returns the source string.
      • Methods inherited from class

        close, mark, markSupported, read, read, ready, reset, skip
      • Methods inherited from class

        nullReader, read, read, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • s

        private final java.lang.String s
    • Constructor Detail

      • SourceStringReader

        public SourceStringReader​(@Nonnull
                                  java.lang.String s)
        Creates a source string reader.
        s - String providing the character stream
    • Method Detail

      • getSourceString

        public java.lang.String getSourceString()
        Returns the source string.