commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1453229 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
Date Wed, 06 Mar 2013 09:09:18 GMT
Author: simonetripodi
Date: Wed Mar  6 09:09:18 2013
New Revision: 1453229

URL: http://svn.apache.org/r1453229
Log:
trivial: code format, no functional modification

Modified:
    commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java

Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java?rev=1453229&r1=1453228&r2=1453229&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
(original)
+++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
Wed Mar  6 09:09:18 2013
@@ -40,7 +40,6 @@ import org.apache.commons.io.FileCleanin
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.DeferredFileOutputStream;
 
-
 /**
  * <p> The default implementation of the
  * {@link org.apache.commons.fileupload.FileItem FileItem} interface.
@@ -89,7 +88,6 @@ public class DiskFileItem
      */
     private static final long serialVersionUID = 2237570099615271025L;
 
-
     /**
      * Default content charset to be used when no explicit charset
      * parameter is provided by the sender. Media subtypes of the
@@ -98,10 +96,8 @@ public class DiskFileItem
      */
     public static final String DEFAULT_CHARSET = "ISO-8859-1";
 
-
     // ----------------------------------------------------------- Data members
 
-
     /**
      * UID used in unique file name generation.
      */
@@ -114,32 +110,27 @@ public class DiskFileItem
      */
     private static int counter = 0;
 
-
     /**
      * The name of the form field as provided by the browser.
      */
     private String fieldName;
 
-
     /**
      * The content type passed by the browser, or <code>null</code> if
      * not defined.
      */
     private String contentType;
 
-
     /**
      * Whether or not this item is a simple form field.
      */
     private boolean isFormField;
 
-
     /**
      * The original filename in the user's filesystem.
      */
     private String fileName;
 
-
     /**
      * The size of the item, in bytes. This is used to cache the size when a
      * file item is moved from its original location.
@@ -152,19 +143,16 @@ public class DiskFileItem
      */
     private int sizeThreshold;
 
-
     /**
      * The directory in which uploaded files will be stored, if stored on disk.
      */
     private File repository;
 
-
     /**
      * Cached contents of the file.
      */
     private byte[] cachedContent;
 
-
     /**
      * Output stream for this item.
      */
@@ -187,7 +175,6 @@ public class DiskFileItem
 
     // ----------------------------------------------------------- Constructors
 
-
     /**
      * Constructs a new <code>DiskFileItem</code> instance.
      *
@@ -216,10 +203,8 @@ public class DiskFileItem
         this.repository = repository;
     }
 
-
     // ------------------------------- Methods from javax.activation.DataSource
 
-
     /**
      * Returns an {@link java.io.InputStream InputStream} that can be
      * used to retrieve the contents of the file.
@@ -241,7 +226,6 @@ public class DiskFileItem
         return new ByteArrayInputStream(cachedContent);
     }
 
-
     /**
      * Returns the content type passed by the agent or <code>null</code> if
      * not defined.
@@ -253,7 +237,6 @@ public class DiskFileItem
         return contentType;
     }
 
-
     /**
      * Returns the content charset passed by the agent or <code>null</code> if
      * not defined.
@@ -269,7 +252,6 @@ public class DiskFileItem
         return params.get("charset");
     }
 
-
     /**
      * Returns the original filename in the client's filesystem.
      *
@@ -283,10 +265,8 @@ public class DiskFileItem
         return Streams.checkFileName(fileName);
     }
 
-
     // ------------------------------------------------------- FileItem methods
 
-
     /**
      * Provides a hint as to whether or not the file contents will be read
      * from memory.
@@ -301,7 +281,6 @@ public class DiskFileItem
         return dfos.isInMemory();
     }
 
-
     /**
      * Returns the size of the file.
      *
@@ -319,7 +298,6 @@ public class DiskFileItem
         }
     }
 
-
     /**
      * Returns the contents of the file as an array of bytes.  If the
      * contents of the file were not yet cached in memory, they will be
@@ -356,7 +334,6 @@ public class DiskFileItem
         return fileData;
     }
 
-
     /**
      * Returns the contents of the file as a String, using the specified
      * encoding.  This method uses {@link #get()} to retrieve the
@@ -374,7 +351,6 @@ public class DiskFileItem
         return new String(get(), charset);
     }
 
-
     /**
      * Returns the contents of the file as a String, using the default
      * character encoding.  This method uses {@link #get()} to retrieve the
@@ -397,7 +373,6 @@ public class DiskFileItem
         }
     }
 
-
     /**
      * A convenience method to write an uploaded item to disk. The client code
      * is not concerned with whether or not the item is stored in memory, or on
@@ -476,7 +451,6 @@ public class DiskFileItem
         }
     }
 
-
     /**
      * Deletes the underlying storage for a file item, including deleting any
      * associated temporary disk file. Although this storage will be deleted
@@ -492,7 +466,6 @@ public class DiskFileItem
         }
     }
 
-
     /**
      * Returns the name of the field in the multipart form corresponding to
      * this file item.
@@ -506,7 +479,6 @@ public class DiskFileItem
         return fieldName;
     }
 
-
     /**
      * Sets the field name used to reference this file item.
      *
@@ -519,7 +491,6 @@ public class DiskFileItem
         this.fieldName = fieldName;
     }
 
-
     /**
      * Determines whether or not a <code>FileItem</code> instance represents
      * a simple form field.
@@ -534,7 +505,6 @@ public class DiskFileItem
         return isFormField;
     }
 
-
     /**
      * Specifies whether or not a <code>FileItem</code> instance represents
      * a simple form field.
@@ -549,7 +519,6 @@ public class DiskFileItem
         isFormField = state;
     }
 
-
     /**
      * Returns an {@link java.io.OutputStream OutputStream} that can
      * be used for storing the contents of the file.
@@ -568,10 +537,8 @@ public class DiskFileItem
         return dfos;
     }
 
-
     // --------------------------------------------------------- Public methods
 
-
     /**
      * Returns the {@link java.io.File} object for the <code>FileItem</code>'s
      * data's temporary location on the disk. Note that for
@@ -589,10 +556,8 @@ public class DiskFileItem
         return dfos == null ? null : dfos.getFile();
     }
 
-
     // ------------------------------------------------------ Protected methods
 
-
     /**
      * Removes the file contents from the temporary storage.
      */
@@ -605,7 +570,6 @@ public class DiskFileItem
         }
     }
 
-
     /**
      * Creates and returns a {@link java.io.File File} representing a uniquely
      * named temporary file in the configured repository path. The lifetime of
@@ -629,10 +593,8 @@ public class DiskFileItem
         return tempFile;
     }
 
-
     // -------------------------------------------------------- Private methods
 
-
     /**
      * Returns an identifier that is unique within the class loader used to
      * load this class, but does not have random-like apearance.
@@ -655,9 +617,6 @@ public class DiskFileItem
         return id;
     }
 
-
-
-
     /**
      * Returns a string representation of this object.
      *
@@ -676,10 +635,8 @@ public class DiskFileItem
             + this.getFieldName();
     }
 
-
     // -------------------------------------------------- Serialization methods
 
-
     /**
      * Writes the state of this object during serialization.
      *
@@ -742,4 +699,5 @@ public class DiskFileItem
     public void setHeaders(FileItemHeaders pHeaders) {
         headers = pHeaders;
     }
+
 }



Mime
View raw message