org.apache.commons.net.io

Class DotTerminatedMessageReader

public final class DotTerminatedMessageReader extends Reader

DotTerminatedMessageReader is a class used to read messages from a server that are terminated by a single dot followed by a <CR><LF> sequence and with double dots appearing at the begining of lines which do not signal end of message yet start with a dot. Various Internet protocols such as NNTP and POP3 produce messages of this type.

This class handles stripping of the duplicate period at the beginning of lines starting with a period, converts NETASCII newlines to the local line separator format, truncates the end of message indicator, and ensures you cannot read past the end of the message.

Version: $Id: DotTerminatedMessageReader.java 636825 2008-03-13 18:34:52Z sebb $

Author: Daniel F. Savarese

Constructor Summary
DotTerminatedMessageReader(Reader reader)
Creates a DotTerminatedMessageReader that wraps an existing Reader input source.

Constructor Detail

DotTerminatedMessageReader

public DotTerminatedMessageReader(Reader reader)
Creates a DotTerminatedMessageReader that wraps an existing Reader input source.

Parameters: reader The Reader input source containing the message.