Class MergeLineReader

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

    public class MergeLineReader
    extends java.io.PushbackReader
    A stream filtering line breaks escaped by a backslash character from the underlying stream.
    • Field Summary

      • Fields inherited from class java.io.FilterReader

        in
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      MergeLineReader​(java.io.Reader in)
      Creates a new MergeLineReader object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPos()
      Returns the position of the next character to be read, is initially 0.
      int read()
      DOCUMENT-ME
      int read​(char[] cbuf, int off, int len)
      DOCUMENT-ME
      void reset()
      DOCUMENT-ME
      void unread​(char[] cbuf)
      DOCUMENT-ME
      void unread​(char[] cbuf, int off, int len)
      DOCUMENT-ME
      void unread​(int c)  
      • Methods inherited from class java.io.PushbackReader

        close, mark, markSupported, 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

      • MergeLineReader

        public MergeLineReader​(java.io.Reader in)
        Creates a new MergeLineReader object.
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        DOCUMENT-ME
        Overrides:
        read in class java.io.PushbackReader
        Throws:
        java.io.IOException - DOCUMENT-ME
      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        DOCUMENT-ME
        Overrides:
        read in class java.io.PushbackReader
        Throws:
        java.io.IOException - DOCUMENT-ME
      • reset

        public void reset()
                   throws java.io.IOException
        DOCUMENT-ME
        Overrides:
        reset in class java.io.PushbackReader
        Throws:
        java.io.IOException - DOCUMENT-ME
      • unread

        public void unread​(char[] cbuf)
                    throws java.io.IOException
        DOCUMENT-ME
        Overrides:
        unread in class java.io.PushbackReader
        Throws:
        java.io.IOException - DOCUMENT-ME
      • unread

        public void unread​(char[] cbuf,
                           int off,
                           int len)
                    throws java.io.IOException
        DOCUMENT-ME
        Overrides:
        unread in class java.io.PushbackReader
        Throws:
        java.io.IOException - DOCUMENT-ME
      • unread

        public void unread​(int c)
                    throws java.io.IOException
        Overrides:
        unread in class java.io.PushbackReader
        Throws:
        java.io.IOException
        See Also:
        PushbackReader.unread(int)
      • getPos

        public int getPos()
        Returns the position of the next character to be read, is initially 0. Escaped line breaks are counted as well. E.g. after having read the string "A\\\nB" getPos() would return 4.