Class ReusableStringReader

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

    final class ReusableStringReader
    extends java.io.Reader
    Internal class to enable reuse of the string reader by Analyzer.tokenStream(String,String)
    • Field Summary

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

        lock
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      int read()  
      int read​(char[] c, int off, int len)  
      (package private) void setValue​(java.lang.String s)  
      • Methods inherited from class java.io.Reader

        mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • pos

        private int pos
      • size

        private int size
      • s

        private java.lang.String s
    • Constructor Detail

      • ReusableStringReader

        ReusableStringReader()
    • Method Detail

      • setValue

        void setValue​(java.lang.String s)
      • read

        public int read()
        Overrides:
        read in class java.io.Reader
      • read

        public int read​(char[] c,
                        int off,
                        int len)
        Specified by:
        read in class java.io.Reader
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Reader