Class CRLFLineReader

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

    public final class CRLFLineReader
    extends java.io.BufferedReader
    CRLFLineReader implements a readLine() method that requires exactly CRLF to terminate an input line. This is required for IMAP, which allows bare CR and LF.
    Since:
    3.0
    • Field Summary

      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      CRLFLineReader​(java.io.Reader reader)
      Creates a CRLFLineReader that wraps an existing Reader input source.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String readLine()
      Read a line of text.
      • Methods inherited from class java.io.BufferedReader

        close, lines, 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
    • Constructor Detail

      • CRLFLineReader

        public CRLFLineReader​(java.io.Reader reader)
        Creates a CRLFLineReader that wraps an existing Reader input source.
        Parameters:
        reader - The Reader input source.
    • Method Detail

      • readLine

        public java.lang.String readLine()
                                  throws java.io.IOException
        Read a line of text. A line is considered to be terminated by carriage return followed immediately by a linefeed. This contrasts with BufferedReader which also allows other combinations.
        Overrides:
        readLine in class java.io.BufferedReader
        Throws:
        java.io.IOException
        Since:
        3.0