Package aQute.lib.io

Class LineSeparatorBufferedReader

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

    public class LineSeparatorBufferedReader
    extends java.io.BufferedReader
    BufferedReader which returns the line separator string for the previously read line.
    • Field Summary

      • Fields inherited from class java.io.Reader

        lock
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String lineSeparator()
      Return the line separator string from the previously read line using readLine() or the empty string if end of file.
      void mark​(int readAheadLimit)  
      int read()  
      int read​(char[] cbuf)  
      int read​(char[] cbuf, int off, int len)  
      int read​(java.nio.CharBuffer target)  
      java.lang.String readLine()  
      boolean ready()  
      void reset()  
      long skip​(long n)  
      • Methods inherited from class java.io.BufferedReader

        close, lines, markSupported
      • Methods inherited from class java.io.Reader

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

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

      • LineSeparatorBufferedReader

        public LineSeparatorBufferedReader​(java.io.Reader in)
      • LineSeparatorBufferedReader

        public LineSeparatorBufferedReader​(java.io.Reader in,
                                           int size)
    • Method Detail

      • mark

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

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.BufferedReader
        Throws:
        java.io.IOException
      • read

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

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

        public int read​(java.nio.CharBuffer target)
                 throws java.io.IOException
        Specified by:
        read in interface java.lang.Readable
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.IOException
      • read

        public int read​(char[] cbuf)
                 throws java.io.IOException
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.IOException
      • readLine

        public java.lang.String readLine()
                                  throws java.io.IOException
        Overrides:
        readLine in class java.io.BufferedReader
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.BufferedReader
        Throws:
        java.io.IOException
      • ready

        public boolean ready()
                      throws java.io.IOException
        Overrides:
        ready in class java.io.BufferedReader
        Throws:
        java.io.IOException
      • lineSeparator

        public java.lang.String lineSeparator()
                                       throws java.io.IOException
        Return the line separator string from the previously read line using readLine() or the empty string if end of file. This method can be called once per read line. Subsequent calls per read line will return the empty string.
        Returns:
        The line separator string from the previously read line.
        Throws:
        java.io.IOException - If an exception occurs reading.