Class RecordFilterReader

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

    public class RecordFilterReader
    extends java.io.FilterReader
    A Reader implementation for tracking the current line number, current position and record text.
    Since:
    2.0
    • Field Summary

      • Fields inherited from class java.io.FilterReader

        in
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      RecordFilterReader​(java.io.Reader in)
      Constructs a new RecordFilterReader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLineNumber()  
      long getPosition()  
      void mark​(int readAheadLimit)  
      int read()  
      java.lang.String recordCompleted()  
      void recordStarted()  
      void recordStarted​(java.lang.String text)  
      void reset()  
      • Methods inherited from class java.io.FilterReader

        close, markSupported, read, ready, 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
    • Constructor Detail

      • RecordFilterReader

        public RecordFilterReader​(java.io.Reader in)
        Constructs a new RecordFilterReader.
        Parameters:
        in - the Reader to read from
    • Method Detail

      • getLineNumber

        public int getLineNumber()
      • getPosition

        public long getPosition()
      • recordStarted

        public void recordStarted()
      • recordStarted

        public void recordStarted​(java.lang.String text)
      • recordCompleted

        public java.lang.String recordCompleted()
                                         throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterReader
        Throws:
        java.io.IOException
      • mark

        public void mark​(int readAheadLimit)
                  throws java.io.IOException
        Overrides:
        mark in class java.io.FilterReader
        Throws:
        java.io.IOException
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.FilterReader
        Throws:
        java.io.IOException