org.apache.tools.mail
Class SmtpResponseReader
java.lang.Objectorg.apache.tools.mail.SmtpResponseReader
public class SmtpResponseReader
extends java.lang.Object
A wrapper around the raw input from the SMTP server that assembles
multi line responses into a single String.
The same rules used here would apply to FTP and other Telnet
based protocols as well.
protected BufferedReader | reader
|
void | close()- Closes the underlying stream.
|
String | getResponse()- Read until the server indicates that the response is complete.
|
protected boolean | hasMoreLines(String line)- Should we expect more input?
|
reader
protected BufferedReader reader
SmtpResponseReader
public SmtpResponseReader(InputStream in)
Wrap this input stream.
in - the stream to wrap.
close
public void close()
throws IOException Closes the underlying stream.
getResponse
public String getResponse()
throws IOException Read until the server indicates that the response is complete.
- Responsecode (3 digits) + Blank + Text from all
response line concatenated (with blanks replacing the \r\n
sequences).
hasMoreLines
protected boolean hasMoreLines(String line)
Should we expect more input?
line - the line to check.
- true if there are more lines to check.
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.