commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joc...@apache.org
Subject svn commit: r502350 - in /jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload: FileUploadBase.java MultipartStream.java disk/DiskFileItemFactory.java servlet/FileCleanerCleanup.java
Date Thu, 01 Feb 2007 20:42:49 GMT
Author: jochen
Date: Thu Feb  1 12:42:48 2007
New Revision: 502350

URL: http://svn.apache.org/viewvc?view=rev&rev=502350
Log:
Making checkstyle and clirr happy.

Modified:
    jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/FileUploadBase.java
    jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/MultipartStream.java
    jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
    jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java

Modified: jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/FileUploadBase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/FileUploadBase.java?view=diff&rev=502350&r1=502349&r2=502350
==============================================================================
--- jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/FileUploadBase.java
(original)
+++ jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/FileUploadBase.java
Thu Feb  1 12:42:48 2007
@@ -158,7 +158,7 @@
      */
     public static final int MAX_HEADER_SIZE = 1024;
 
-    
+
     // ----------------------------------------------------------- Data members
 
 
@@ -342,7 +342,8 @@
             List items = new ArrayList();
             FileItemFactory fac = getFileItemFactory();
             if (fac == null) {
-                throw new NullPointerException("No FileItemFactory has been set.");
+                throw new NullPointerException(
+                    "No FileItemFactory has been set.");
             }
             while (iter.hasNext()) {
                 FileItemStream item = iter.next();
@@ -485,7 +486,7 @@
                 getFileName(headers));
     }
 
-    
+
     /**
      * <p> Parses the <code>header-part</code> and returns as key/value
      * pairs.
@@ -1114,14 +1115,17 @@
         private static final long serialVersionUID = -2474893167098052828L;
 
         /**
-         * @deprecated Replaced by {@link #SizeLimitExceededException(String, long, long)}

+         * @deprecated Replaced by
+         * {@link #SizeLimitExceededException(String, long, long)}
          */
         public SizeLimitExceededException() {
             this(null, 0, 0);
         }
 
         /**
-         * @deprecated Replaced by {@link #SizeLimitExceededException(String, long, long)}

+         * @deprecated Replaced by
+         * {@link #SizeLimitExceededException(String, long, long)}
+         * @param message The exceptions detail message.
          */
         public SizeLimitExceededException(String message) {
             this(message, 0, 0);

Modified: jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/MultipartStream.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/MultipartStream.java?view=diff&rev=502350&r1=502349&r2=502350
==============================================================================
--- jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/MultipartStream.java
(original)
+++ jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/MultipartStream.java
Thu Feb  1 12:42:48 2007
@@ -278,6 +278,38 @@
 
     // ----------------------------------------------------------- Constructors
 
+    /**
+     * Creates a new instance.
+     * @deprecated Use {@link #MultipartStream(InputStream, byte[],
+     * org.apache.commons.fileupload.MultipartStream.ProgressNotifier)},
+     * or {@link #MultipartStream(InputStream, byte[], int,
+     * org.apache.commons.fileupload.MultipartStream.ProgressNotifier)}
+     */
+    public MultipartStream() {
+        this(null, null, null);
+    }
+
+    /**
+     * <p> Constructs a <code>MultipartStream</code> with a custom size
buffer
+     * and no progress notifier.
+     *
+     * <p> Note that the buffer must be at least big enough to contain the
+     * boundary string, plus 4 characters for CR/LF and double dash, plus at
+     * least one byte of data.  Too small a buffer size setting will degrade
+     * performance.
+     *
+     * @param input    The <code>InputStream</code> to serve as a data source.
+     * @param boundary The token used for dividing the stream into
+     *                 <code>encapsulations</code>.
+     * @param bufSize  The size of the buffer to be used, in bytes.
+     *
+     * @see #MultipartStream(InputStream, byte[], ProgressNotifier)
+     * @deprecated Use {@link #MultipartStream(InputStream, byte[], int,
+     *  org.apache.commons.fileupload.MultipartStream.ProgressNotifier)}.
+     */
+    public MultipartStream(InputStream input, byte[] boundary, int bufSize) {
+        this(input, boundary, bufSize, null);
+    }
 
     /**
      * <p> Constructs a <code>MultipartStream</code> with a custom size
buffer.
@@ -337,6 +369,21 @@
         this(input, boundary, DEFAULT_BUFSIZE, pNotifier);
     }
 
+    /**
+     * <p> Constructs a <code>MultipartStream</code> with a default size
buffer.
+     *
+     * @param input    The <code>InputStream</code> to serve as a data source.
+     * @param boundary The token used for dividing the stream into
+     *                 <code>encapsulations</code>.
+     *
+     * @deprecated Use {@link #MultipartStream(InputStream, byte[],
+     *  ProgressNotifier)}.
+     * @see #MultipartStream(InputStream, byte[], int, ProgressNotifier)
+     */
+    public MultipartStream(InputStream input,
+            byte[] boundary) {
+        this(input, boundary, DEFAULT_BUFSIZE, null);
+    }
 
     // --------------------------------------------------------- Public methods
 

Modified: jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java?view=diff&rev=502350&r1=502349&r2=502350
==============================================================================
--- jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
(original)
+++ jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
Thu Feb  1 12:42:48 2007
@@ -20,7 +20,6 @@
 
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.FileItemFactory;
-import org.apache.commons.io.FileCleaner;
 
 /**
  * <p>The default {@link org.apache.commons.fileupload.FileItemFactory}
@@ -45,11 +44,11 @@
  * soon as they are no longer needed. (More precisely, when the
  * corresponding instance of {@link java.io.File} is garbage collected.)
  * This is done by the so-called reaper thread, which is started
- * automatically when the class {@link FileCleaner} is loaded.
- * It might make sense to terminate that thread, for example, if
- * your web application ends. See the section on "Resource cleanup"
+ * automatically when the class {@link org.apache.commons.io.FileCleaner}
+ * is loaded. It might make sense to terminate that thread, for example,
+ * if your web application ends. See the section on "Resource cleanup"
  * in the users guide of commons-fileupload.</p>
- * 
+ *
  * @author <a href="mailto:martinc@apache.org">Martin Cooper</a>
  *
  * @since FileUpload 1.1
@@ -90,6 +89,7 @@
      * may be configured by calling the appropriate setter methods.
      */
     public DiskFileItemFactory() {
+        // Does nothing.
     }
 
 

Modified: jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java?view=diff&rev=502350&r1=502349&r2=502350
==============================================================================
--- jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java
(original)
+++ jakarta/commons/proper/fileupload/branches/b1_2/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java
Thu Feb  1 12:42:48 2007
@@ -24,7 +24,8 @@
 
 /**
  * A servlet context listener, which ensures that the
- * {@link org.apache.commons.io.FileCleaner FileCleaner's} reaper thread is terminated,
+ * {@link org.apache.commons.io.FileCleaner FileCleaner's}
+ * reaper thread is terminated,
  * when the web application is destroyed.
  */
 public class FileCleanerCleanup implements ServletContextListener {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message