org.apache.commons.net.io
Class CRLFLineReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
org.apache.commons.net.io.CRLFLineReader
- All Implemented Interfaces:
- Closeable, Readable
public final class CRLFLineReader
- extends 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
Constructor Summary |
CRLFLineReader(Reader reader)
Creates a CRLFLineReader that wraps an existing Reader
input source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CRLFLineReader
public CRLFLineReader(Reader reader)
- Creates a CRLFLineReader that wraps an existing Reader
input source.
- Parameters:
reader
- The Reader input source.
readLine
public String readLine()
throws 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 BufferedReader
- Throws:
IOException
- Since:
- 3.0
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.