org.apache.tools.mail
Class SmtpResponseReader
java.lang.Object
|
+--org.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.
- Author:
- Stefan Bodewig
Field Summary |
protected java.io.BufferedReader |
reader
|
Method Summary |
void |
close()
Closes the underlying stream. |
java.lang.String |
getResponse()
Read until the server indicates that the response is complete. |
protected boolean |
hasMoreLines(java.lang.String line)
Should we expect more input? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reader
protected java.io.BufferedReader reader
SmtpResponseReader
public SmtpResponseReader(java.io.InputStream in)
- Wrap this input stream.
getResponse
public java.lang.String getResponse()
throws java.io.IOException
- Read until the server indicates that the response is complete.
- Returns:
- Responsecode (3 digits) + Blank + Text from all
response line concatenated (with blanks replacing the \r\n
sequences).
close
public void close()
throws java.io.IOException
- Closes the underlying stream.
hasMoreLines
protected boolean hasMoreLines(java.lang.String line)
- Should we expect more input?
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.