geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r390524 [7/7] - in /geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail: authentication/ store/nntp/ store/nntp/newsrc/ store/pop3/ store/pop3/message/ store/pop3/response/ transport/nntp/ transport/smtp/ util/
Date Fri, 31 Mar 2006 22:24:56 GMT
Modified: geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportException.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportException.java?rev=390524&r1=390523&r2=390524&view=diff
==============================================================================
--- geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportException.java
(original)
+++ geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportException.java
Fri Mar 31 14:24:52 2006
@@ -18,8 +18,8 @@
 package org.apache.geronimo.javamail.transport.smtp;
 
 /**
- *  General purpose Exception
- *
+ * General purpose Exception
+ * 
  * @version $Id: SMTPTransportException.java 375375 2006-02-06 21:16:28Z bsnyder $
  */
 class SMTPTransportException extends Exception {
@@ -33,7 +33,7 @@
     }
 
     SMTPTransportException(String s, Exception t) {
-        super(s,t);
+        super(s, t);
     }
 
     SMTPTransportException(Exception t) {

Modified: geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/MIMEOutputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/MIMEOutputStream.java?rev=390524&r1=390523&r2=390524&view=diff
==============================================================================
--- geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/MIMEOutputStream.java
(original)
+++ geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/MIMEOutputStream.java
Fri Mar 31 14:24:52 2006
@@ -21,10 +21,10 @@
 import java.io.OutputStream;
 
 /**
- * An implementation of an OutputStream that performs MIME linebreak canonicalization
- * and "byte-stuff" so that data content does not get mistaken for a message data-end
- * marker (CRLF.CRLF)l
- *
+ * An implementation of an OutputStream that performs MIME linebreak
+ * canonicalization and "byte-stuff" so that data content does not get mistaken
+ * for a message data-end marker (CRLF.CRLF)l
+ * 
  * @version $Rev$ $Date$
  */
 public class MIMEOutputStream extends OutputStream {
@@ -35,52 +35,58 @@
     // last character we handled...used to recongnize line breaks.
     protected int lastWrite = -1;
 
-    // a flag to indicate we've just processed a line break.  This is used for byte stuffing
purposes.  This
-    // is initially true, because if the first character of the content is a period, we need
to byte-stuff
+    // a flag to indicate we've just processed a line break. This is used for
+    // byte stuffing purposes. This
+    // is initially true, because if the first character of the content is a
+    // period, we need to byte-stuff
     // immediately.
     protected boolean atLineBreak = true;
 
     /**
      * Create an output stream that writes to the target output stream.
-     *
-     * @param out    The wrapped output stream.
+     * 
+     * @param out
+     *            The wrapped output stream.
      */
     public MIMEOutputStream(OutputStream out) {
         this.out = out;
     }
 
-
-    // in order for this to work, we only need override the single character form, as the
others
+    // in order for this to work, we only need override the single character
+    // form, as the others
     // funnel through this one by default.
     public void write(int ch) throws IOException {
-        // if this is a CR character, always write out a full sequence, and remember that
we just did this.
+        // if this is a CR character, always write out a full sequence, and
+        // remember that we just did this.
         if (ch == '\r') {
-            out.write((byte)'\r');
-            out.write((byte)'\n');
+            out.write((byte) '\r');
+            out.write((byte) '\n');
             // we've just taken a break;
             atLineBreak = true;
         }
-        // if this is a new line, then we need to determine if this is a loner or part of
a CRLF sequence.
+        // if this is a new line, then we need to determine if this is a loner
+        // or part of a CRLF sequence.
         else if (ch == '\n') {
             // is this a lone ranger?
             if (lastWrite != '\r') {
                 // write the full CRLF sequence.
-                out.write((byte)'\r');
-                out.write((byte)'\n');
+                out.write((byte) '\r');
+                out.write((byte) '\n');
             }
-            // regardless of whether we wrote something or not, we're still at a line break.
+            // regardless of whether we wrote something or not, we're still at a
+            // line break.
             atLineBreak = true;
         }
         // potential byte-stuffing situation?
         else if (ch == '.') {
-            // ok, this is a potential stuff situation.  Did we just have a line break? 
Double up the character.
+            // ok, this is a potential stuff situation. Did we just have a line
+            // break? Double up the character.
             if (atLineBreak) {
                 out.write('.');
             }
             out.write('.');
             atLineBreak = false;
-        }
-        else {
+        } else {
             // just write this out and flip the linebreak flag.
             out.write(ch);
             atLineBreak = false;
@@ -89,6 +95,3 @@
         lastWrite = ch;
     }
 }
-
-
-

Modified: geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceInputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceInputStream.java?rev=390524&r1=390523&r2=390524&view=diff
==============================================================================
--- geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceInputStream.java
(original)
+++ geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceInputStream.java
Fri Mar 31 14:24:52 2006
@@ -30,54 +30,59 @@
 public class TraceInputStream extends FilterInputStream {
     // the current debug setting
     protected boolean debug = false;
+
     // the target trace output stream.
     protected OutputStream traceStream;
 
     /**
      * Construct a debug trace stream.
-     *
-     * @param in     The source input stream.
+     * 
+     * @param in
+     *            The source input stream.
      * @param traceStream
-     *               The side trace stream to which trace data gets written.
-     * @param encode Indicates whether we wish the Trace data to be Q-P encoded.
+     *            The side trace stream to which trace data gets written.
+     * @param encode
+     *            Indicates whether we wish the Trace data to be Q-P encoded.
      */
     public TraceInputStream(InputStream in, OutputStream traceStream, boolean debug, boolean
encode) {
         super(in);
         this.debug = debug;
         if (encode) {
             this.traceStream = new QuotedPrintableEncoderStream(traceStream);
-        }
-        else {
+        } else {
             this.traceStream = traceStream;
         }
     }
 
     /**
      * Set the current setting of the debug trace stream debug flag.
-     *
-     * @param d      The new debug flag settings.
+     * 
+     * @param d
+     *            The new debug flag settings.
      */
     public void setDebug(boolean d) {
         debug = d;
     }
 
-
     /**
-     * Reads up to <code>len</code> bytes of data from this input stream
-     * into an array of bytes. This method blocks until some input is
-     * available.
+     * Reads up to <code>len</code> bytes of data from this input stream into
+     * an array of bytes. This method blocks until some input is available.
      * <p>
-     * This method simply performs <code>in.read(b, off, len)</code>
-     * and returns the result.
-     *
-     * @param      b     the buffer into which the data is read.
-     * @param      off   the start offset of the data.
-     * @param      len   the maximum number of bytes read.
-     * @return     the total number of bytes read into the buffer, or
-     *             <code>-1</code> if there is no more data because the end of
-     *             the stream has been reached.
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterInputStream#in
+     * This method simply performs <code>in.read(b, off, len)</code> and
+     * returns the result.
+     * 
+     * @param b
+     *            the buffer into which the data is read.
+     * @param off
+     *            the start offset of the data.
+     * @param len
+     *            the maximum number of bytes read.
+     * @return the total number of bytes read into the buffer, or
+     *         <code>-1</code> if there is no more data because the end of the
+     *         stream has been reached.
+     * @exception IOException
+     *                if an I/O error occurs.
+     * @see java.io.FilterInputStream#in
      */
     public int read(byte b[], int off, int len) throws IOException {
         int count = in.read(b, off, len);
@@ -88,21 +93,21 @@
     }
 
     /**
-     * Reads the next byte of data from this input stream. The value
-     * byte is returned as an <code>int</code> in the range
-     * <code>0</code> to <code>255</code>. If no byte is available
-     * because the end of the stream has been reached, the value
-     * <code>-1</code> is returned. This method blocks until input data
-     * is available, the end of the stream is detected, or an exception
-     * is thrown.
+     * Reads the next byte of data from this input stream. The value byte is
+     * returned as an <code>int</code> in the range <code>0</code>
to
+     * <code>255</code>. If no byte is available because the end of the
+     * stream has been reached, the value <code>-1</code> is returned. This
+     * method blocks until input data is available, the end of the stream is
+     * detected, or an exception is thrown.
      * <p>
-     * This method
-     * simply performs <code>in.read()</code> and returns the result.
-     *
-     * @return     the next byte of data, or <code>-1</code> if the end of the
-     *             stream is reached.
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterInputStream#in
+     * This method simply performs <code>in.read()</code> and returns the
+     * result.
+     * 
+     * @return the next byte of data, or <code>-1</code> if the end of the
+     *         stream is reached.
+     * @exception IOException
+     *                if an I/O error occurs.
+     * @see java.io.FilterInputStream#in
      */
     public int read() throws IOException {
         int b = in.read();

Modified: geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceOutputStream.java?rev=390524&r1=390523&r2=390524&view=diff
==============================================================================
--- geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
(original)
+++ geronimo/trunk/modules/javamail-transport/src/java/org/apache/geronimo/javamail/util/TraceOutputStream.java
Fri Mar 31 14:24:52 2006
@@ -29,56 +29,62 @@
 public class TraceOutputStream extends FilterOutputStream {
     // the current debug setting
     protected boolean debug = false;
+
     // the target trace output stream.
     protected OutputStream traceStream;
 
     /**
      * Construct a debug trace stream.
-     *
-     * @param out    The target out put stream.
+     * 
+     * @param out
+     *            The target out put stream.
      * @param traceStream
-     *               The side trace stream to which trace data gets written.
-     * @param encode Indicates whether we wish the Trace data to be Q-P encoded.
+     *            The side trace stream to which trace data gets written.
+     * @param encode
+     *            Indicates whether we wish the Trace data to be Q-P encoded.
      */
     public TraceOutputStream(OutputStream out, OutputStream traceStream, boolean debug, boolean
encode) {
         super(out);
         this.debug = debug;
         if (encode) {
             this.traceStream = new QuotedPrintableEncoderStream(traceStream);
-        }
-        else {
+        } else {
             this.traceStream = traceStream;
         }
     }
 
     /**
      * Set the current setting of the debug trace stream debug flag.
-     *
-     * @param d      The new debug flag settings.
+     * 
+     * @param d
+     *            The new debug flag settings.
      */
     public void setDebug(boolean d) {
         debug = d;
     }
 
     /**
-     * Writes <code>len</code> bytes from the specified
-     * <code>byte</code> array starting at offset <code>off</code>
to
-     * this output stream.
+     * Writes <code>len</code> bytes from the specified <code>byte</code>
+     * array starting at offset <code>off</code> to this output stream.
      * <p>
      * The <code>write</code> method of <code>FilterOutputStream</code>
      * calls the <code>write</code> method of one argument on each
      * <code>byte</code> to output.
      * <p>
-     * Note that this method does not call the <code>write</code> method
-     * of its underlying input stream with the same arguments. Subclasses
-     * of <code>FilterOutputStream</code> should provide a more efficient
+     * Note that this method does not call the <code>write</code> method of
+     * its underlying input stream with the same arguments. Subclasses of
+     * <code>FilterOutputStream</code> should provide a more efficient
      * implementation of this method.
-     *
-     * @param      b     the data.
-     * @param      off   the start offset in the data.
-     * @param      len   the number of bytes to write.
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterOutputStream#write(int)
+     * 
+     * @param b
+     *            the data.
+     * @param off
+     *            the start offset in the data.
+     * @param len
+     *            the number of bytes to write.
+     * @exception IOException
+     *                if an I/O error occurs.
+     * @see java.io.FilterOutputStream#write(int)
      */
     public void write(byte b[], int off, int len) throws IOException {
         if (debug) {
@@ -97,9 +103,11 @@
      * that is, it performs <tt>out.write(b)</tt>.
      * <p>
      * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>.
-     *
-     * @param      b   the <code>byte</code>.
-     * @exception  IOException  if an I/O error occurs.
+     * 
+     * @param b
+     *            the <code>byte</code>.
+     * @exception IOException
+     *                if an I/O error occurs.
      */
     public void write(int b) throws IOException {
         if (debug) {
@@ -108,4 +116,3 @@
         super.write(b);
     }
 }
-



Mime
View raw message