| java.lang.Object java.io.Reader org.apache.james.util.CRLFTerminatedReader
CRLFTerminatedReader | public class CRLFTerminatedReader extends Reader (Code) | | A Reader for use with SMTP or other protocols in which lines
must end with CRLF. Extends Reader and overrides its
readLine() method. The Reader readLine() method cannot
serve for SMTP because it ends lines with either CR or LF alone.
|
Inner Class :public class TerminationException extends IOException | |
Inner Class :public class LineLengthExceededException extends IOException | |
Field Summary | |
InputStream | in Constructs this CRLFTerminatedReader.
Parameters: in - an InputStream Parameters: charsetName - the String name of a supported charset. |
Method Summary | |
public void | close() | public int | read() | public int | read(char cbuf, int off, int len) | public String | readLine() Read a line of text which is terminated by CRLF. | public boolean | ready() |
in | InputStream in(Code) | | Constructs this CRLFTerminatedReader.
Parameters: in - an InputStream Parameters: charsetName - the String name of a supported charset. "ASCII" is common here. throws: UnsupportedEncodingException - if the named charsetis not supported |
readLine | public String readLine() throws IOException(Code) | | Read a line of text which is terminated by CRLF. The concluding
CRLF characters are not returned with the String, but if either CR
or LF appears in the text in any other sequence it is returned
in the String like any other character. Some characters at the
end of the stream may be lost if they are in a "line" not
terminated by CRLF.
either a String containing the contents of a line which must end with CRLF, or null if the end of the stream has been reached, possibly discarding some characters in a line not terminated with CRLF. throws: IOException - if an I/O error occurs. |
|
|