public class SmtpResponseReader extends Object
The same rules used here would apply to FTP and other Telnet based protocols as well.
Modifier and Type | Field and Description |
---|---|
protected BufferedReader |
reader |
Constructor and Description |
---|
SmtpResponseReader(InputStream in)
Wrap this input stream.
|
Modifier and Type | Method and Description |
---|---|
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?
|
protected BufferedReader reader
public SmtpResponseReader(InputStream in)
in
- the stream to wrap.public void close() throws IOException
IOException
- on error.public String getResponse() throws IOException
IOException
- on error.protected boolean hasMoreLines(String line)
line
- the line to check.