You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/12/04 20:50:46 UTC
svn commit: r1417138 -
/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/
Author: tn
Date: Tue Dec 4 19:50:44 2012
New Revision: 1417138
URL: http://svn.apache.org/viewvc?rev=1417138&view=rev
Log:
Javadoc fixes.
Modified:
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/DefaultAuthenticator.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailAttachment.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailException.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailUtils.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/SimpleEmail.java
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java Tue Dec 4 19:50:44 2012
@@ -42,13 +42,13 @@ import javax.activation.DataSource;
*/
public class ByteArrayDataSource implements DataSource
{
- /** define the buffer size */
+ /** Define the buffer size. */
public static final int BUFFER_SIZE = 512;
- /** Stream containg the Data */
+ /** Stream containing the Data. */
private ByteArrayOutputStream baos;
- /** Content-type. */
+ /** The Content-type. */
private final String type;// = "application/octet-stream";
/**
@@ -94,7 +94,7 @@ public class ByteArrayDataSource impleme
/**
* Create a datasource from a String.
- * N.B. assumes the data string can be converted using the charset iso-8859-1
+ * N.B. assumes the data string can be converted using the charset iso-8859-1.
*
* @param data A String.
* @param aType A String.
@@ -109,9 +109,8 @@ public class ByteArrayDataSource impleme
{
baos = new ByteArrayOutputStream();
- // Assumption that the string contains only ASCII
- // characters! Else just pass in a charset into this
- // constructor and use it in getBytes().
+ // Assumption that the string contains only ASCII characters!
+ // Else just pass in a charset into this constructor and use it in getBytes().
baos.write(data.getBytes("iso-8859-1"));
baos.flush();
baos.close();
@@ -150,7 +149,7 @@ public class ByteArrayDataSource impleme
baos = new ByteArrayOutputStream();
osWriter = new BufferedOutputStream(baos);
- //Write the InputData to OutputStream
+ // Write the InputData to OutputStream
while ((length = bis.read(buffer)) != -1)
{
osWriter.write(buffer, 0, length);
@@ -215,7 +214,7 @@ public class ByteArrayDataSource impleme
}
/**
- * Get the OutputStream to write to
+ * Get the OutputStream to write to.
*
* @return An OutputStream
* @since 1.0
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/DefaultAuthenticator.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/DefaultAuthenticator.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/DefaultAuthenticator.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/DefaultAuthenticator.java Tue Dec 4 19:50:44 2012
@@ -29,11 +29,11 @@ import javax.mail.PasswordAuthentication
*/
public class DefaultAuthenticator extends Authenticator
{
- /** Stores the login information for authentication */
+ /** Stores the login information for authentication. */
private final PasswordAuthentication authentication;
/**
- * Default constructor
+ * Default constructor.
*
* @param userName user name to use when authentication is requested
* @param password password to use when authentication is requested
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java Tue Dec 4 19:50:44 2012
@@ -44,7 +44,7 @@ import javax.naming.NamingException;
/**
* The base class for all email messages. This class sets the
- * sender's email & name, receiver's email & name, subject, and the
+ * sender's email & name, receiver's email & name, subject, and the
* sent date. Subclasses are responsible for setting the message
* body.
*
@@ -66,28 +66,28 @@ public abstract class Email implements E
/** The email message to send. */
protected MimeMessage message;
- /** The charset to use for this message */
+ /** The charset to use for this message. */
protected String charset;
- /** The Address of the sending party, mandatory */
+ /** The Address of the sending party, mandatory. */
protected InternetAddress fromAddress;
- /** The Subject */
+ /** The Subject. */
protected String subject;
- /** An attachment */
+ /** An attachment. */
protected MimeMultipart emailBody;
- /** The content */
+ /** The content. */
protected Object content;
- /** The content type */
+ /** The content type. */
protected String contentType;
- /** Set session debugging on or off */
+ /** Set session debugging on or off. */
protected boolean debug;
- /** Sent date */
+ /** Sent date. */
protected Date sentDate;
/**
@@ -98,7 +98,7 @@ public abstract class Email implements E
/**
* The hostname of the mail server with which to connect. If null will try
- * to get property from system.properties. If still null, quit
+ * to get property from system.properties. If still null, quit.
*/
protected String hostName;
@@ -114,16 +114,16 @@ public abstract class Email implements E
*/
protected String sslSmtpPort = "465";
- /** List of "to" email adresses */
+ /** List of "to" email addresses. */
protected List<InternetAddress> toList = new ArrayList<InternetAddress>();
- /** List of "cc" email adresses */
+ /** List of "cc" email addresses. */
protected List<InternetAddress> ccList = new ArrayList<InternetAddress>();
- /** List of "bcc" email adresses */
+ /** List of "bcc" email addresses. */
protected List<InternetAddress> bccList = new ArrayList<InternetAddress>();
- /** List of "replyTo" email adresses */
+ /** List of "replyTo" email addresses. */
protected List<InternetAddress> replyList = new ArrayList<InternetAddress>();
/**
@@ -148,13 +148,13 @@ public abstract class Email implements E
*/
protected boolean popBeforeSmtp;
- /** the host name of the pop3 server */
+ /** the host name of the pop3 server. */
protected String popHost;
- /** the user name to log into the pop3 server */
+ /** the user name to log into the pop3 server. */
protected String popUsername;
- /** the password to log into the pop3 server */
+ /** the password to log into the pop3 server. */
protected String popPassword;
/**
@@ -200,13 +200,13 @@ public abstract class Email implements E
*/
private boolean sslCheckServerIdentity;
- /** socket I/O timeout value in milliseconds */
+ /** socket I/O timeout value in milliseconds. */
protected int socketTimeout = SOCKET_TIMEOUT_MS;
- /** socket connection timeout value in milliseconds */
+ /** socket connection timeout value in milliseconds. */
protected int socketConnectionTimeout = SOCKET_TIMEOUT_MS;
- /** The Session to mail with */
+ /** The Session to mail with. */
private Session session;
/**
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailAttachment.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailAttachment.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailAttachment.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailAttachment.java Tue Dec 4 19:50:44 2012
@@ -27,10 +27,10 @@ import java.net.URL;
*/
public class EmailAttachment
{
- /** Definition of the part being an attachment */
+ /** Definition of the part being an attachment. */
public static final String ATTACHMENT = javax.mail.Part.ATTACHMENT;
- /** Definition of the part being inline */
+ /** Definition of the part being inline. */
public static final String INLINE = javax.mail.Part.INLINE;
/** The name of this attachment. */
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailException.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailException.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailException.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailException.java Tue Dec 4 19:50:44 2012
@@ -35,7 +35,7 @@ import java.io.PrintWriter;
public class EmailException
extends Exception
{
- /** Serializable version identifier */
+ /** Serializable version identifier. */
private static final long serialVersionUID = 5550674499282474616L;
/**
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailUtils.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailUtils.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/EmailUtils.java Tue Dec 4 19:50:44 2012
@@ -45,10 +45,8 @@ import java.io.IOException;
final class EmailUtils
{
/**
- * <p>
* Random object used by random method. This has to be not local to the random method
* so as to not return the same value in the same millisecond.
- * </p>
*/
private static final Random RANDOM = new Random();
@@ -61,9 +59,7 @@ final class EmailUtils
}
/**
- * <p>
* Checks if a String is empty ("") or null.
- * </p>
*
* @param str the String to check, may be null
*
@@ -77,9 +73,7 @@ final class EmailUtils
}
/**
- * <p>
* Checks if a String is not empty ("") and not null.
- * </p>
*
* @param str the String to check, may be null
*
@@ -93,9 +87,8 @@ final class EmailUtils
}
/**
- * <p>
- * Validate an argument, throwing <code>IllegalArgumentException</code> if the argument is <code>null</code>.
- * </p>
+ * Validate an argument, throwing <code>IllegalArgumentException</code>
+ * if the argument is <code>null</code>.
*
* @param object the object to check is not <code>null</code>
* @param message the exception message you would like to see if the object is <code>null</code>
@@ -113,9 +106,7 @@ final class EmailUtils
}
/**
- * <p>
* Creates a random string whose length is the number of characters specified.
- * </p>
*
* <p>
* Characters will be chosen from the set of alphabetic characters.
@@ -133,9 +124,7 @@ final class EmailUtils
}
/**
- * <p>
* Creates a random string based on a variety of options, using supplied source of randomness.
- * </p>
*
* <p>
* If start and end are both <code>0</code>, start and end are set to <code>' '</code> and <code>'z'</code>,
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java Tue Dec 4 19:50:44 2012
@@ -86,22 +86,22 @@ import javax.mail.internet.MimeMultipart
*/
public class HtmlEmail extends MultiPartEmail
{
- /** Definition of the length of generated CID's */
+ /** Definition of the length of generated CID's. */
public static final int CID_LENGTH = 10;
- /** prefix for default HTML mail */
+ /** prefix for default HTML mail. */
private static final String HTML_MESSAGE_START = "<html><body><pre>";
- /** suffix for default HTML mail */
+ /** suffix for default HTML mail. */
private static final String HTML_MESSAGE_END = "</pre></body></html>";
/**
- * Text part of the message. This will be used as alternative text if
+ * Text part of the message. This will be used as alternative text if
* the email client does not support HTML messages.
*/
protected String text;
- /** Html part of the message */
+ /** Html part of the message. */
protected String html;
/**
@@ -204,7 +204,7 @@ public class HtmlEmail extends MultiPart
* @param urlString String representation of the URL.
* @param name The name that will be set in the filename header field.
* @return A String with the Content-ID of the URL.
- * @throws EmailException when URL supplied is invalid or if <code> is null
+ * @throws EmailException when URL supplied is invalid or if {@code name} is null
* or empty; also see {@link javax.mail.internet.MimeBodyPart} for definitions
*
* @see #embed(URL, String)
@@ -250,7 +250,7 @@ public class HtmlEmail extends MultiPart
* @param name The name that will be set in the filename header
* field.
* @return A String with the Content-ID of the file.
- * @throws EmailException when URL supplied is invalid or if <code> is null
+ * @throws EmailException when URL supplied is invalid or if {@code name} is null
* or empty; also see {@link javax.mail.internet.MimeBodyPart} for definitions
* @since 1.0
*/
@@ -617,11 +617,11 @@ public class HtmlEmail extends MultiPart
*/
private static class InlineImage
{
- /** content id */
+ /** content id. */
private String cid;
- /** <code>DataSource</code> for the content */
+ /** <code>DataSource</code> for the content. */
private DataSource dataSource;
- /** the <code>MimeBodyPart</code> that contains the encoded data */
+ /** the <code>MimeBodyPart</code> that contains the encoded data. */
private MimeBodyPart mbp;
/**
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java Tue Dec 4 19:50:44 2012
@@ -61,10 +61,10 @@ public class MultiPartEmail extends Emai
/** The MIME subtype. */
private String subType;
- /** Indicates if the message has been initialized */
+ /** Indicates if the message has been initialized. */
private boolean initialized;
- /** Indicates if attachments have been added to the message */
+ /** Indicates if attachments have been added to the message. */
private boolean boolHasAttachments;
/**
@@ -264,7 +264,7 @@ public class MultiPartEmail extends Emai
}
/**
- * Attach a file
+ * Attach a file.
*
* @param file A file attachment
* @return A MultiPartEmail.
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/SimpleEmail.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/SimpleEmail.java?rev=1417138&r1=1417137&r2=1417138&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/SimpleEmail.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/SimpleEmail.java Tue Dec 4 19:50:44 2012
@@ -32,7 +32,7 @@ package org.apache.commons.mail;
public class SimpleEmail extends Email
{
/**
- * Set the content of the mail
+ * Set the content of the mail.
*
* @param msg A String.
* @return An Email.