donaldp 01/12/22 04:47:11
Modified: proposal/myrmidon/src/main/org/apache/tools/mail
MailMessage.java SmtpResponseReader.java
Log:
restyled
Revision Changes Path
1.3 +9 -7
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java
Index: MailMessage.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MailMessage.java 2001/12/21 14:21:24 1.2
+++ MailMessage.java 2001/12/22 12:47:11 1.3
@@ -6,16 +6,17 @@
* the LICENSE file.
*/
package org.apache.tools.mail;
+
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.Socket;
-import java.util.Iterator;
-import java.util.Hashtable;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
/**
* A class to help send SMTP email. This class is an improvement on the
@@ -348,7 +349,7 @@
// Check that the response is one of the valid codes
for( int i = 0; i < ok.length; i++ )
{
- if( response.startsWith( "" + ok[i] ) )
+ if( response.startsWith( "" + ok[ i ] ) )
{
return true;
}
@@ -364,7 +365,7 @@
socket = new Socket( host, port );
out = new MailPrintStream(
new BufferedOutputStream(
- socket.getOutputStream() ) );
+ socket.getOutputStream() ) );
in = new SmtpResponseReader( socket.getInputStream() );
getReady();
}
@@ -387,8 +388,8 @@
Enumeration e = headers.keys();
while( e.hasMoreElements() )
{
- String name = ( String )e.nextElement();
- String value = ( String )headers.get( name );
+ String name = (String)e.nextElement();
+ String value = (String)headers.get( name );
out.println( name + ": " + value );
}
out.println();
@@ -471,6 +472,7 @@
// This PrintStream subclass makes sure that <CRLF>. becomes <CRLF>..
// per RFC 821. It also ensures that new lines are always \r\n.
//
+
class MailPrintStream extends PrintStream
{
@@ -506,7 +508,7 @@
{
for( int i = 0; i < len; i++ )
{
- write( buf[off + i] );
+ write( buf[ off + i ] );
}
}
1.2 +1 -0
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/mail/SmtpResponseReader.java
Index: SmtpResponseReader.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/mail/SmtpResponseReader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SmtpResponseReader.java 2001/12/15 12:06:33 1.1
+++ SmtpResponseReader.java 2001/12/22 12:47:11 1.2
@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.mail;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>