Class SourceStringReader

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

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

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

        lock
    • Constructor Summary

      Constructors 
      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 java.io.StringReader

        close, mark, markSupported, read, read, ready, reset, skip
      • Methods inherited from class java.io.Reader

        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.
        Parameters:
        s - String providing the character stream
    • Method Detail

      • getSourceString

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