commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r804273 - in /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs: ./ auth/ impl/ operations/ operations/vcs/ provider/
Date Fri, 14 Aug 2009 15:56:53 GMT
Author: rgoers
Date: Fri Aug 14 15:56:52 2009
New Revision: 804273

URL: http://svn.apache.org/viewvc?rev=804273&view=rev
Log:
Fix a few hundred more checkstyle errors

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticator.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/auth/StaticUserAuthenticator.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsStatus.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdate.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdateListener.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileNameParser.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileSystem.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractLayeredFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractOriginatingFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessStreamContent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractVfsComponent.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/CompositeFileProvider.java
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticator.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticator.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticator.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/UserAuthenticator.java Fri Aug 14 15:56:52 2009
@@ -17,7 +17,7 @@
 package org.apache.commons.vfs;
 
 /**
- * The user authenticator is used to query credentials from the user. Since a UserAuthenticator 
+ * The user authenticator is used to query credentials from the user. Since a UserAuthenticator
  * is provided with the {@link FileSystemOptions} to a {@link FileSystem} it should also implement
  * reasonable equals and hashCode functions if the FileSystem should be shared.
  * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/auth/StaticUserAuthenticator.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/auth/StaticUserAuthenticator.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/auth/StaticUserAuthenticator.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/auth/StaticUserAuthenticator.java Fri Aug 14 15:56:52 2009
@@ -54,7 +54,8 @@
     /**
      * {@inheritDoc}
      */
-    public int hashCode() {
+    public int hashCode()
+    {
         final int prime = 37;
         int result = 1;
         result = prime * result + ((domain == null) ? 0 : domain.hashCode());
@@ -67,31 +68,40 @@
     /**
      * {@inheritDoc}
      */
-    public boolean equals(Object obj) {
-        if (this == obj) {
+    public boolean equals(Object obj)
+    {
+        if (this == obj)
+        {
             return true;
         }
 
-        if (obj == null) {
+        if (obj == null)
+        {
             return false;
         }
 
-        if (getClass() != obj.getClass()) {
+        if (getClass() != obj.getClass())
+        {
             return false;
         }
 
-        StaticUserAuthenticator other = (StaticUserAuthenticator)obj;
+        StaticUserAuthenticator other = (StaticUserAuthenticator) obj;
         return equalsNullsafe(domain, other.domain)
                 && equalsNullsafe(username, other.username)
                 && equalsNullsafe(password, other.password);
     }
 
-    private boolean equalsNullsafe(final String thisString, final String otherString) {
-        if (thisString == null) {
-            if (otherString != null) {
+    private boolean equalsNullsafe(final String thisString, final String otherString)
+    {
+        if (thisString == null)
+        {
+            if (otherString != null)
+            {
                 return false;
             }
-        } else if (!thisString.equals(otherString)) {
+        }
+        else if (!thisString.equals(otherString))
+        {
             return false;
         }
         return true;
@@ -100,8 +110,9 @@
     /**
      * {@inheritDoc}
      */
-    public int compareTo(final Object o) {
-        StaticUserAuthenticator other = (StaticUserAuthenticator)o;
+    public int compareTo(final Object o)
+    {
+        StaticUserAuthenticator other = (StaticUserAuthenticator) o;
         int result = compareStringOrNull(domain, other.domain);
         result = result == 0 ? compareStringOrNull(username, other.username) : result;
         result = result == 0 ? compareStringOrNull(password, other.password) : result;
@@ -109,39 +120,52 @@
         return result;
     }
 
-    private int compareStringOrNull(final String thisString, final String otherString) {
-        if (thisString == null) {
-            if (otherString != null) {
+    private int compareStringOrNull(final String thisString, final String otherString)
+    {
+        if (thisString == null)
+        {
+            if (otherString != null)
+            {
                 return -1;
             }
-        } else {
-            if (otherString == null) {
+        }
+        else
+        {
+            if (otherString == null)
+            {
                 return 1;
             }
 
             final int result = thisString.compareTo(otherString);
-            if (result != 0) {
+            if (result != 0)
+            {
                 return result;
             }
         }
 
         return 0;
     }
-    
+
     /**
      * {@inheritDoc}
      */
-    public String toString() {
+    public String toString()
+    {
         StringBuffer buffer = new StringBuffer();
-        if (domain != null) {
+        if (domain != null)
+        {
             buffer.append(domain).append('\\');
         }
-        if (username != null) {
+        if (username != null)
+        {
             buffer.append(username);
-        } else {
+        }
+        else
+        {
             buffer.append("(null)");
         }
-        if (password != null) {
+        if (password != null)
+        {
             buffer.append(":***");
         }
         return buffer.toString();

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java Fri Aug 14 15:56:52 2009
@@ -766,7 +766,7 @@
         String scheme = UriParser.extractScheme(buffer.toString());
 
         // Determine whether to prepend the base path
-        if (name.length() == 0 || (scheme == null && buffer.charAt(0) != FileName.SEPARATOR_CHAR ))
+        if (name.length() == 0 || (scheme == null && buffer.charAt(0) != FileName.SEPARATOR_CHAR))
         {
             // Supplied path is not absolute
             if (!VFS.isUriStyle())
@@ -794,7 +794,7 @@
         String fullPath;
         if (scheme != null)
         {
-            fullPath = resolvedPath;   
+            fullPath = resolvedPath;
         }
         else
         {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java Fri Aug 14 15:56:52 2009
@@ -27,8 +27,6 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.VfsLog;
 import org.apache.commons.vfs.operations.FileOperationProvider;

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/DefaultFileOperations.java Fri Aug 14 15:56:52 2009
@@ -54,7 +54,7 @@
 
     /**
      * @return The operation classes.
-     * @throws org.apache.commons.vfs.FileSystemException
+     * @throws FileSystemException If an error occurs.
      *
      */
     public Class[] getOperations() throws FileSystemException

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsStatus.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsStatus.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsStatus.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsStatus.java Fri Aug 14 15:56:52 2009
@@ -26,27 +26,27 @@
  */
 public interface VcsStatus extends FileOperation
 {
-    public final static int UNKNOWN = -1;
-    public final static int NOT_MODIFIED = 0;
-    public final static int ADDED = 1;
-    public final static int CONFLICTED = 2;
-    public final static int DELETED = 3;
-    public final static int MERGED = 4;
-    public final static int IGNORED = 5;
-    public final static int MODIFIED = 6;
-    public final static int REPLACED = 7;
-    public final static int UNVERSIONED = 8;
-    public final static int MISSING = 9;
-    public final static int OBSTRUCTED = 10;
-    public final static int REVERTED = 11;
-    public final static int RESOLVED = 12;
-    public final static int COPIED = 13;
-    public final static int MOVED = 14;
-    public final static int RESTORED = 15;
-    public final static int UPDATED = 16;
-    public final static int EXTERNAL = 18;
-    public final static int CORRUPTED = 19;
-    public final static int NOT_REVERTED = 20;
+    int UNKNOWN = -1;
+    int NOT_MODIFIED = 0;
+    int ADDED = 1;
+    int CONFLICTED = 2;
+    int DELETED = 3;
+    int MERGED = 4;
+    int IGNORED = 5;
+    int MODIFIED = 6;
+    int REPLACED = 7;
+    int UNVERSIONED = 8;
+    int MISSING = 9;
+    int OBSTRUCTED = 10;
+    int REVERTED = 11;
+    int RESOLVED = 12;
+    int COPIED = 13;
+    int MOVED = 14;
+    int RESTORED = 15;
+    int UPDATED = 16;
+    int EXTERNAL = 18;
+    int CORRUPTED = 19;
+    int NOT_REVERTED = 20;
 
     /**
      *

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdate.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdate.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdate.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdate.java Fri Aug 14 15:56:52 2009
@@ -28,25 +28,25 @@
 {
     /**
      *
-     * @param revision
+     * @param revision The revision number.
      */
     void setRevision(final long revision);
 
     /**
      *
-     * @param isRecursive
+     * @param isRecursive true if recursive.
      */
     void setRecursive(final boolean isRecursive);
 
     /**
      *
-     * @param listener
+     * @param listener The UpdateListener.
      */
     void addUpdateListener(final VcsUpdateListener listener);
 
     /**
      *
-     * @param listener
+     * @param listener The UpdateListener.
      */
     void removeUpdateListener(final VcsUpdateListener listener);
 }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdateListener.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdateListener.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdateListener.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/operations/vcs/VcsUpdateListener.java Fri Aug 14 15:56:52 2009
@@ -26,8 +26,8 @@
 {
     /**
      *
-     * @param path
-     * @param revision
+     * @param path The path.
+     * @param revision The revision number.
      * @param contentStatus
      *            takes one of the values as defined in the
      * @see VcsStatus constants.

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java Fri Aug 14 15:56:52 2009
@@ -71,12 +71,13 @@
 
     /**
      * Returns the hashcode for this name.
+     * @return The hashCode.
      */
     public int hashCode()
     {
         if (calculateHashCode)
         {
-            calculatedHashCode = (getRootURI().hashCode() ^ getPath().hashCode());
+            calculatedHashCode = getRootURI().hashCode() ^ getPath().hashCode();
             calculateHashCode = false;
         }
         return calculatedHashCode;
@@ -84,6 +85,8 @@
 
     /**
      * Determines if this object is equal to another.
+     * @param obj The object to compare.
+     * @return true if equal, false if not.
      */
     public boolean equals(final Object obj)
     {
@@ -92,13 +95,14 @@
             return false;
         }
         final AbstractFileName name = (AbstractFileName) obj;
-        return (getRootURI().equals(name.getRootURI()) && getPath().equals(name.getPath()));
+        return getRootURI().equals(name.getRootURI()) && getPath().equals(name.getPath());
     }
 
     /**
      * Implement Comparable
      *
      * @param obj another abstractfilename
+     * @return negative number if less than, 0 if equal, postive if greater than.
      */
     public int compareTo(Object obj)
     {
@@ -122,6 +126,7 @@
 
     /**
      * Returns the URI of the file.
+     * @return the FileName as a URI.
      */
     public String toString()
     {
@@ -130,17 +135,23 @@
 
     /**
      * Factory method for creating name instances.
+     * @param absPath The absolute path.
+     * @param type The FileType.
+     * @return The FileName.
      */
     public abstract FileName createName(String absPath, FileType type);
 
     /**
      * Builds the root URI for this file name.  Note that the root URI must not
      * end with a separator character.
+     * @param buffer A StringBuffer to use to construct the URI.
+     * @param addPassword true if the password should be added, false otherwise.
      */
     protected abstract void appendRootUri(StringBuffer buffer, boolean addPassword);
 
     /**
      * Returns the base name of the file.
+     * @return The base name of the file.
      */
     public String getBaseName()
     {
@@ -163,6 +174,7 @@
     /**
      * Returns the absolute path of the file, relative to the root of the
      * file system that the file belongs to.
+     * @return The path String.
      */
     public String getPath()
     {
@@ -178,6 +190,11 @@
         return getType().hasChildren() ? "/" : "";
     }
 
+    /**
+     * Returns the decoded path.
+     * @return The decoded path String.
+     * @throws FileSystemException If an error occurs.
+     */
     public String getPathDecoded() throws FileSystemException
     {
         if (decodedAbsPath == null)
@@ -190,6 +207,7 @@
 
     /**
      * Returns the name of the parent of the file.
+     * @return the FileName of the parent.
      */
     public FileName getParent()
     {
@@ -214,6 +232,7 @@
 
     /**
      * find the root of the filesystem
+     * @return The root FileName.
      */
     public FileName getRoot()
     {
@@ -228,6 +247,7 @@
 
     /**
      * Returns the URI scheme of this file.
+     * @return The protocol used to access the file.
      */
     public String getScheme()
     {
@@ -236,6 +256,7 @@
 
     /**
      * Returns the absolute URI of the file.
+     * @return The absolute URI of the file.
      */
     public String getURI()
     {
@@ -256,6 +277,9 @@
 
     /**
      * Converts a file name to a relative name, relative to this file name.
+     * @param name The FileName.
+     * @return The relative path to the file.
+     * @throws FileSystemException if an error occurs.
      */
     public String getRelativeName(final FileName name) throws FileSystemException
     {
@@ -316,6 +340,7 @@
 
     /**
      * Returns the root URI of the file system this file belongs to.
+     * @return The URI of the root.
      */
     public String getRootURI()
     {
@@ -331,6 +356,7 @@
 
     /**
      * Returns the depth of this file name, within its file system.
+     * @return The depth of the file name.
      */
     public int getDepth()
     {
@@ -349,6 +375,7 @@
 
     /**
      * Returns the extension of this file name.
+     * @return The file extension.
      */
     public String getExtension()
     {
@@ -376,6 +403,8 @@
 
     /**
      * Determines if another file name is an ancestor of this file name.
+     * @param ancestor The FileName to check.
+     * @return true if the FileName is an ancestor, false otherwise.
      */
     public boolean isAncestor(final FileName ancestor)
     {
@@ -388,6 +417,8 @@
 
     /**
      * Determines if another file name is a descendent of this file name.
+     * @param descendent The FileName to check.
+     * @return true if the FileName is a descendent, false otherwise.
      */
     public boolean isDescendent(final FileName descendent)
     {
@@ -396,6 +427,9 @@
 
     /**
      * Determines if another file name is a descendent of this file name.
+     * @param descendent The FileName to check.
+     * @param scope The NameScope.
+     * @return true if the FileName is a descendent, false otherwise.
      */
     public boolean isDescendent(final FileName descendent,
                                 final NameScope scope)
@@ -429,6 +463,7 @@
      * sets the type of this file e.g. when it will be attached.
      *
      * @param type {@link FileType#FOLDER} or {@link FileType#FILE}
+     * @throws FileSystemException if an error occurs.
      */
     void setType(FileType type) throws FileSystemException
     {
@@ -445,6 +480,8 @@
      *
      * @param basePath An absolute, normalised path.
      * @param path   An absolute, normalised path.
+     * @param scope The NameScope.
+     * @return true if the path fits in the scope, false otherwise.
      */
     public static boolean checkName(final String basePath,
                                     final String path,
@@ -504,6 +541,7 @@
 
     /**
      * returns a "friendly path", this is a path without a password.
+     * @return The "friendly" URI.
      */
     public String getFriendlyURI()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileNameParser.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileNameParser.java Fri Aug 14 15:56:52 2009
@@ -18,6 +18,7 @@
 
 /**
  * Provides methods to parse a filename into a {@link org.apache.commons.vfs.FileName}
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public abstract class AbstractFileNameParser implements FileNameParser
 {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java Fri Aug 14 15:56:52 2009
@@ -16,11 +16,25 @@
  */
 package org.apache.commons.vfs.provider;
 
-import org.apache.commons.vfs.*;
+
 import org.apache.commons.vfs.operations.DefaultFileOperations;
 import org.apache.commons.vfs.operations.FileOperations;
 import org.apache.commons.vfs.util.FileObjectUtils;
 import org.apache.commons.vfs.util.RandomAccessMode;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileName;
+import org.apache.commons.vfs.FileContent;
+import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.RandomAccessContent;
+import org.apache.commons.vfs.FileSystem;
+import org.apache.commons.vfs.Capability;
+import org.apache.commons.vfs.FileNotFolderException;
+import org.apache.commons.vfs.NameScope;
+import org.apache.commons.vfs.Selectors;
+import org.apache.commons.vfs.FileSelector;
+import org.apache.commons.vfs.FileContentInfoFactory;
+import org.apache.commons.vfs.FileUtil;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -158,7 +172,8 @@
      * Lists the children of this file.  Is only called if {@link #doGetType}
      * returns {@link FileType#FOLDER}.  The return value of this method
      * is cached, so the implementation can be expensive.<br>
-     * Other than <code>doListChildren</code> you could return FileObject's to e.g. reinitialize the type of the file.<br>
+     * Other than <code>doListChildren</code> you could return FileObject's to e.g. reinitialize the
+     * type of the file.<br>
      * (Introduced for Webdav: "permission denied on resource" during getType())
      */
     protected FileObject[] doListChildrenResolved() throws Exception
@@ -371,6 +386,7 @@
 
     /**
      * Returns the URI of the file.
+     * @return The URI of the file.
      */
     public String toString()
     {
@@ -379,6 +395,7 @@
 
     /**
      * Returns the name of the file.
+     * @return The FileName.
      */
     public FileName getName()
     {
@@ -387,6 +404,7 @@
 
     /**
      * Returns the file system this file belongs to.
+     * @return The FileSystem this file is associated with.
      */
     public FileSystem getFileSystem()
     {
@@ -395,6 +413,8 @@
 
     /**
      * Returns a URL representation of the file.
+     * @return The URL representation of the file.
+     * @throws FileSystemException if an error occurs.
      */
     public URL getURL() throws FileSystemException
     {
@@ -418,14 +438,18 @@
 
     /**
      * Determines if the file exists.
+     * @return true if the file exists, false otherwise,
+     * @throws FileSystemException if an error occurs.
      */
     public boolean exists() throws FileSystemException
     {
-        return (getType() != FileType.IMAGINARY);
+        return getType() != FileType.IMAGINARY;
     }
 
     /**
      * Returns the file's type.
+     * @return The FileType.
+     * @throws FileSystemException if an error occurs.
      */
     public FileType getType() throws FileSystemException
     {
@@ -456,6 +480,8 @@
 
     /**
      * Determines if this file can be read.
+     * @return true if the file is a hidden file, false otherwise.
+     * @throws FileSystemException if an error occurs.
      */
     public boolean isHidden() throws FileSystemException
     {
@@ -478,6 +504,8 @@
 
     /**
      * Determines if this file can be read.
+     * @return true if the file can be read, false otherwise.
+     * @throws FileSystemException if an error occurs.
      */
     public boolean isReadable() throws FileSystemException
     {
@@ -500,6 +528,8 @@
 
     /**
      * Determines if this file can be written to.
+     * @return true if the file can be written to, false otherwise.
+     * @throws FileSystemException if an error occurs.
      */
     public boolean isWriteable() throws FileSystemException
     {
@@ -527,6 +557,8 @@
 
     /**
      * Returns the parent of the file.
+     * @return the parent FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject getParent() throws FileSystemException
     {
@@ -557,6 +589,8 @@
 
     /**
      * Returns the children of the file.
+     * @return an array of FileObjects, one per child.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject[] getChildren() throws FileSystemException
     {
@@ -689,6 +723,9 @@
 
     /**
      * Returns a child of this file.
+     * @param name The name of the child to locate.
+     * @return The FileObject for the file or null if the child does not exist.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject getChild(final String name) throws FileSystemException
     {
@@ -710,6 +747,10 @@
 
     /**
      * Returns a child by name.
+     * @param name The name of the child to locate.
+     * @param scope the NameScope.
+     * @return The FileObject for the file or null if the child does not exist.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject resolveFile(final String name, final NameScope scope)
         throws FileSystemException
@@ -725,6 +766,8 @@
      *             path, which is resolved relative to this file, or an
      *             absolute path, which is resolved relative to the file system
      *             that contains this file.
+     * @return The FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject resolveFile(final String path) throws FileSystemException
     {
@@ -782,6 +825,7 @@
      *
      * @return true if this object has been deleted
      * @todo This will not fail if this is a non-empty folder.
+     * @throws FileSystemException if an error occurs.
      */
     public boolean delete() throws FileSystemException
     {
@@ -791,7 +835,9 @@
     /**
      * Deletes this file, and all children.
      *
-     * @return the number of deleted files
+     * @param selector The FileSelector.
+     * @return the number of deleted files.
+     * @throws FileSystemException if an error occurs.
      */
     public int delete(final FileSelector selector) throws FileSystemException
     {
@@ -838,6 +884,7 @@
 
     /**
      * Creates this file, if it does not exist.
+     * @throws FileSystemException if an error occurs.
      */
     public void createFile() throws FileSystemException
     {
@@ -845,7 +892,8 @@
         {
             try
             {
-                // VFS-210: We do not want to trunc any existing file, checking for its existence is still required
+                // VFS-210: We do not want to trunc any existing file, checking for its existence is
+                // still required
                 if (exists() && !FileType.FILE.equals(getType()))
                 {
                     throw new FileSystemException("vfs.provider/create-file.error", name);
@@ -871,6 +919,7 @@
     /**
      * Creates this folder, if it does not exist.  Also creates any ancestor
      * files which do not exist.
+     * @throws FileSystemException if an error occurs.
      */
     public void createFolder() throws FileSystemException
     {
@@ -886,7 +935,8 @@
             {
                 throw new FileSystemException("vfs.provider/create-folder-mismatched-type.error", name);
             }
-            /* VFS-210: checking for writeable is not always possible as the security constraint might be more complex
+            /* VFS-210: checking for writeable is not always possible as the security constraint might
+               be more complex
             if (!isWriteable())
             {
                 throw new FileSystemException("vfs.provider/create-folder-read-only.error", name);
@@ -921,6 +971,9 @@
 
     /**
      * Copies another file to this file.
+     * @param file The FileObject to copy.
+     * @param selector The FileSelector.
+     * @throws FileSystemException if an error occurs.
      */
     public void copyFrom(final FileObject file, final FileSelector selector)
         throws FileSystemException
@@ -932,7 +985,8 @@
         /* we do not alway know if a file is writeable
         if (!isWriteable())
         {
-            throw new FileSystemException("vfs.provider/copy-read-only.error", new Object[]{file.getType(), file.getName(), this}, null);
+            throw new FileSystemException("vfs.provider/copy-read-only.error", new Object[]{file.getType(),
+            file.getName(), this}, null);
         }
         */
 
@@ -980,6 +1034,8 @@
 
     /**
      * Moves (rename) the file to another one
+     * @param destFile The target FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public void moveTo(FileObject destFile) throws FileSystemException
     {
@@ -987,7 +1043,8 @@
         {
             if (!getParent().isWriteable())
             {
-                throw new FileSystemException("vfs.provider/rename-parent-read-only.error", new FileName[]{getName(), getParent().getName()});
+                throw new FileSystemException("vfs.provider/rename-parent-read-only.error", new FileName[]{getName(),
+                        getParent().getName()});
             }
         }
         else
@@ -1037,9 +1094,11 @@
 
             destFile.copyFrom(this, Selectors.SELECT_SELF);
 
-            if (((destFile.getType().hasContent() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE)) ||
-                (destFile.getType().hasChildren() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER))) &&
-                getFileSystem().hasCapability(Capability.GET_LAST_MODIFIED))
+            if (((destFile.getType().hasContent()
+                    && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE))
+                  || (destFile.getType().hasChildren()
+                    && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER)))
+                    && getFileSystem().hasCapability(Capability.GET_LAST_MODIFIED))
             {
                 destFile.getContent().setLastModifiedTime(this.getContent().getLastModifiedTime());
             }
@@ -1091,7 +1150,9 @@
      * Finds the set of matching descendents of this file, in depthwise
      * order.
      *
+     * @param selector The FileSelector.
      * @return list of files or null if the base file (this object) do not exist
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject[] findFiles(final FileSelector selector) throws FileSystemException
     {
@@ -1107,6 +1168,8 @@
 
     /**
      * Returns the file's content.
+     * @return the FileContent for this FileObject.
+     * @throws FileSystemException if an error occurs.
      */
     public FileContent getContent() throws FileSystemException
     {
@@ -1131,6 +1194,7 @@
 
     /**
      * This will prepare the fileObject to get resynchronized with the underlaying filesystem if required
+     * @throws FileSystemException if an error occurs.
      */
     public void refresh() throws FileSystemException
     {
@@ -1147,6 +1211,7 @@
 
     /**
      * Closes this file, and its content.
+     * @throws FileSystemException if an error occurs.
      */
     public void close() throws FileSystemException
     {
@@ -1184,6 +1249,8 @@
 
     /**
      * Returns an input stream to use to read the content of the file.
+     * @return The InputStream to access this file's content.
+     * @throws FileSystemException if an error occurs.
      */
     public InputStream getInputStream() throws FileSystemException
     {
@@ -1224,6 +1291,9 @@
     /**
      * Returns an input/output stream to use to read and write the content of the file in and
      * random manner.
+     * @param mode The RandomAccessMode.
+     * @return The RandomAccessContent.
+     * @throws FileSystemException if an error occurs.
      */
     public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException
     {
@@ -1273,6 +1343,8 @@
      * Prepares this file for writing.  Makes sure it is either a file,
      * or its parent folder exists.  Returns an output stream to use to
      * write the content of the file to.
+     * @return An OutputStream where the new contents of the file can be written.
+     * @throws FileSystemException if an error occurs.
      */
     public OutputStream getOutputStream() throws FileSystemException
     {
@@ -1286,6 +1358,8 @@
      *
      * @param bAppend true when append to the file.<br>
      *                Note: If the underlaying filesystem do not support this, it wont work.
+     * @return An OutputStream where the new contents of the file can be written.
+     * @throws FileSystemException if an error occurs.
      */
     public OutputStream getOutputStream(boolean bAppend) throws FileSystemException
     {
@@ -1561,6 +1635,10 @@
     /**
      * Traverses the descendents of this file, and builds a list of selected
      * files.
+     * @param selector The FileSelector.
+     * @param depthwise if true files are added after their descendants, before otherwise.
+     * @param selected A List of the located FileObjects.
+     * @throws FileSystemException if an error occurs.
      */
     public void findFiles(final FileSelector selector,
                           final boolean depthwise,
@@ -1687,11 +1765,11 @@
     }
 
     /**
-     * This method is meant to add a object where this object holds a strong reference then.
+     * This method is meant to add an object where this object holds a strong reference then.
      * E.g. a archive-filesystem creates a list of all childs and they shouldnt get
      * garbage collected until the container is garbage collected
      *
-     * @param strongRef
+     * @param strongRef The Object to add.
      */
     public void holdObject(Object strongRef)
     {
@@ -1714,7 +1792,7 @@
     /**
      * @return FileOperations interface that provides access to the operations
      *         API.
-     * @throws FileSystemException
+     * @throws FileSystemException if an error occurs.
      */
     public FileOperations getFileOperations() throws FileSystemException
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileProvider.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileProvider.java Fri Aug 14 15:56:52 2009
@@ -38,6 +38,13 @@
     extends AbstractVfsContainer
     implements FileProvider
 {
+    /**
+     * The cached file systems.  This is a mapping from root URI to
+     * FileSystem object.
+     */
+    // private final Map fileSystems = new HashMap();
+    private final Map fileSystems = new TreeMap();
+
     private FileNameParser parser;
 
     public AbstractFileProvider()
@@ -56,13 +63,6 @@
     }
 
     /**
-     * The cached file systems.  This is a mapping from root URI to
-     * FileSystem object.
-     */
-    // private final Map fileSystems = new HashMap();
-    private final Map fileSystems = new TreeMap();
-
-    /**
      * Closes the file systems created by this provider.
      */
     public void close()
@@ -77,6 +77,11 @@
 
     /**
      * Creates a layered file system.  This method throws a 'not supported' exception.
+     * @param scheme The protocol to use to access the file.
+     * @param file a FileObject.
+     * @param properties Options to the file system.
+     * @return A FileObject associated with the new FileSystem.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject createFileSystem(final String scheme, final FileObject file, final FileSystemOptions properties)
         throws FileSystemException
@@ -119,11 +124,18 @@
         }
     }
 
+    /**
+     * Returns the FileSystemConfigBuidler.
+     * @return the FileSystemConfigBuilder.
+     */
     public FileSystemConfigBuilder getConfigBuilder()
     {
         return null;
     }
 
+    /**
+     * Free unused resources.
+     */
     public void freeUnusedResources()
     {
         Object[] item;
@@ -141,6 +153,10 @@
         }
     }
 
+    /**
+     * Close the FileSystem.
+     * @param filesystem The FileSystem to close.
+     */
     public void closeFileSystem(final FileSystem filesystem)
     {
         AbstractFileSystem fs = (AbstractFileSystem) filesystem;
@@ -162,6 +178,8 @@
      *
      * @param base The base file - if null the <code>uri</code> needs to be absolute
      * @param uri The URI to parse.
+     * @return The FileName.
+     * @throws FileSystemException if an error occurs.
      */
     public FileName parseUri(FileName base, String uri) throws FileSystemException
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileSystem.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileSystem.java Fri Aug 14 15:56:52 2009
@@ -57,7 +57,7 @@
     extends AbstractVfsComponent
     implements FileSystem
 {
-    private final static Log log = LogFactory.getLog(AbstractFileSystem.class);
+    private static final Log LOG = LogFactory.getLog(AbstractFileSystem.class);
 
     /**
      * The "root" of the file system. This is always "/" so it isn't always the "real"
@@ -122,6 +122,7 @@
 
     /**
      * Initialises this component.
+     * @throws FileSystemException if an error occurs.
      */
     public void init() throws FileSystemException
     {
@@ -170,6 +171,7 @@
 
     /**
      * Returns the name of the root of this file system.
+     * @return the root FileName.
      */
     public FileName getRootName()
     {
@@ -198,13 +200,13 @@
     {
         FilesCache files;
         //if (this.files == null)
-        {
+        //{
             files = getContext().getFileSystemManager().getFilesCache();
             if (files == null)
             {
                 throw new RuntimeException(Messages.getString("vfs.provider/files-cache-missing.error"));
             }
-        }
+        //}
 
         return files;
     }
@@ -228,6 +230,8 @@
 
     /**
      * Determines if this file system has a particular capability.
+     * @param capability the Capability to check for.
+     * @return true if the FileSystem has the Capability, false otherwise.
      */
     public boolean hasCapability(final Capability capability)
     {
@@ -237,6 +241,9 @@
     /**
      * Retrieves the attribute with the specified name. The default
      * implementation simply throws an exception.
+     * @param attrName The name of the attribute.
+     * @return the Object associated with the attribute or null if no object is.
+     * @throws FileSystemException if an error occurs.
      */
     public Object getAttribute(final String attrName) throws FileSystemException
     {
@@ -246,6 +253,9 @@
     /**
      * Sets the attribute with the specified name. The default
      * implementation simply throws an exception.
+     * @param attrName the attribute name.
+     * @param value The object to associate with the attribute.
+     * @throws FileSystemException if an error occurs.
      */
     public void setAttribute(final String attrName, final Object value)
         throws FileSystemException
@@ -255,6 +265,8 @@
 
     /**
      * Returns the parent layer if this is a layered file system.
+     * @return The FileObject for the parent layer.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject getParentLayer() throws FileSystemException
     {
@@ -263,6 +275,8 @@
 
     /**
      * Returns the root file of this file system.
+     * @return The root FileObject of the FileSystem
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject getRoot() throws FileSystemException
     {
@@ -278,6 +292,9 @@
 
     /**
      * Finds a file in this file system.
+     * @param nameStr The name of the file to resolve.
+     * @return The located FileObject or null if none could be located.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject resolveFile(final String nameStr) throws FileSystemException
     {
@@ -288,6 +305,9 @@
 
     /**
      * Finds a file in this file system.
+     * @param name The name of the file to locate.
+     * @return The located FileObject or null if none could be located.
+     * @throws FileSystemException if an error occurs.
      */
     public synchronized FileObject resolveFile(final FileName name) throws FileSystemException
     {
@@ -359,19 +379,23 @@
         {
             try
             {
-                file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst().newInstance(new Object[]{file});
+                file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst().
+                        newInstance(new Object[]{file});
             }
             catch (InstantiationException e)
             {
-                throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e);
+                throw new FileSystemException("vfs.impl/invalid-decorator.error",
+                        getFileSystemManager().getFileObjectDecorator().getName(), e);
             }
             catch (IllegalAccessException e)
             {
-                throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e);
+                throw new FileSystemException("vfs.impl/invalid-decorator.error",
+                        getFileSystemManager().getFileObjectDecorator().getName(), e);
             }
             catch (InvocationTargetException e)
             {
-                throw new FileSystemException("vfs.impl/invalid-decorator.error", getFileSystemManager().getFileObjectDecorator().getName(), e);
+                throw new FileSystemException("vfs.impl/invalid-decorator.error",
+                        getFileSystemManager().getFileObjectDecorator().getName(), e);
             }
         }
 
@@ -380,6 +404,10 @@
 
     /**
      * Creates a temporary local copy of a file and its descendents.
+     * @param file The FileObject to replicate.
+     * @param selector The FileSelector.
+     * @return The replicated File.
+     * @throws FileSystemException if an error occurs.
      */
     public File replicateFile(final FileObject file,
                               final FileSelector selector)
@@ -402,6 +430,7 @@
 
     /**
      * Return the FileSystemOptions used to instantiate this filesystem
+     * @return the FileSystemOptions.
      */
     public FileSystemOptions getFileSystemOptions()
     {
@@ -410,6 +439,7 @@
 
     /**
      * Return the FileSystemManager used to instantiate this filesystem
+     * @return the FileSystemManager.
      */
     public FileSystemManager getFileSystemManager()
     {
@@ -439,6 +469,9 @@
 
     /**
      * Adds a junction to this file system.
+     * @param junctionPoint The junction point.
+     * @param targetFile The target to add.
+     * @throws FileSystemException if an error occurs.
      */
     public void addJunction(final String junctionPoint,
                             final FileObject targetFile)
@@ -449,6 +482,8 @@
 
     /**
      * Removes a junction from this file system.
+     * @param junctionPoint The junction point.
+     * @throws FileSystemException if an error occurs
      */
     public void removeJunction(final String junctionPoint) throws FileSystemException
     {
@@ -457,6 +492,8 @@
 
     /**
      * Adds a listener on a file in this file system.
+     * @param file The FileObject to be monitored.
+     * @param listener The FileListener
      */
     public void addListener(final FileObject file,
                             final FileListener listener)
@@ -475,6 +512,8 @@
 
     /**
      * Removes a listener from a file in this file system.
+     * @param file The FileObject to be monitored.
+     * @param listener The FileListener
      */
     public void removeListener(final FileObject file,
                                final FileListener listener)
@@ -491,6 +530,7 @@
 
     /**
      * Fires a file create event.
+     * @param file The FileObject that was created.
      */
     public void fireFileCreated(final FileObject file)
     {
@@ -499,6 +539,7 @@
 
     /**
      * Fires a file delete event.
+     * @param file The FileObject that was deleted.
      */
     public void fireFileDeleted(final FileObject file)
     {
@@ -508,6 +549,7 @@
     /**
      * Fires a file changed event. <br />
      * This will only happen if you monitor the file using {@link org.apache.commons.vfs.FileMonitor}.
+     * @param file The FileObject that changed.
      */
     public void fireFileChanged(final FileObject file)
     {
@@ -516,6 +558,7 @@
 
     /**
      * returns true if no file is using this filesystem
+     * @return true of no file is using this FileSystem,
      */
     public boolean isReleaseable()
     {
@@ -556,7 +599,7 @@
                 {
                     final String message = Messages.getString("vfs.provider/notify-listener.warn", file);
                     // getLogger().warn(message, e);
-                    VfsLog.warn(getLogger(), log, message, e);
+                    VfsLog.warn(getLogger(), LOG, message, e);
                 }
             }
         }
@@ -627,6 +670,7 @@
 
     /**
      * check if this filesystem has open streams
+     * @return true if the FileSystem has open streams.
      */
     public boolean isOpen()
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractLayeredFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractLayeredFileProvider.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractLayeredFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractLayeredFileProvider.java Fri Aug 14 15:56:52 2009
@@ -41,13 +41,18 @@
 
     /**
      * Locates a file object, by absolute URI.
+     * @param baseFile The base FileObject.
+     * @param uri The name of the file to locate.
+     * @param properties The FileSystemOptions.
+     * @return The FileObject if it is located, null otherwise.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject findFile(final FileObject baseFile,
                                final String uri,
                                final FileSystemOptions properties) throws FileSystemException
     {
         // Split the URI up into its parts
-        final LayeredFileName name = (LayeredFileName) parseUri(baseFile!=null?baseFile.getName():null, uri);
+        final LayeredFileName name = (LayeredFileName) parseUri(baseFile != null ? baseFile.getName() : null, uri);
 
         // Make the URI canonical
 
@@ -64,6 +69,11 @@
 
     /**
      * Creates a layered file system.
+     * @param scheme The protocol to use.
+     * @param file a FileObject.
+     * @param fileSystemOptions Options to access the FileSystem.
+     * @return A FileObject associated with the new FileSystem.
+     * @throws FileSystemException if an error occurs.
      */
     public synchronized FileObject createFileSystem(final String scheme,
                                                     final FileObject file,

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractOriginatingFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractOriginatingFileProvider.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractOriginatingFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractOriginatingFileProvider.java Fri Aug 14 15:56:52 2009
@@ -55,7 +55,7 @@
         final FileName name;
         try
         {
-            name = parseUri(baseFile!=null?baseFile.getName():null, uri);
+            name = parseUri(baseFile != null ? baseFile.getName() : null, uri);
         }
         catch (FileSystemException exc)
         {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessContent.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessContent.java Fri Aug 14 15:56:52 2009
@@ -83,12 +83,12 @@
         throw new UnsupportedOperationException();
     }
 
-    public void write(byte b[]) throws IOException
+    public void write(byte[] b) throws IOException
     {
         throw new UnsupportedOperationException();
     }
 
-    public void write(byte b[], int off, int len) throws IOException
+    public void write(byte[] b, int off, int len) throws IOException
     {
         throw new UnsupportedOperationException();
     }
@@ -110,6 +110,8 @@
 
     /**
      * @deprecated see {@link java.io.DataInputStream#readLine()}
+     * @return The line as a String.
+     * @throws IOException if an error occurs.
      */
     public String readLine() throws IOException
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessStreamContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessStreamContent.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessStreamContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractRandomAccessStreamContent.java Fri Aug 14 15:56:52 2009
@@ -103,12 +103,12 @@
         return data;
     }
 
-    public void readFully(byte b[]) throws IOException
+    public void readFully(byte[] b) throws IOException
     {
         getDataInputStream().readFully(b);
     }
 
-    public void readFully(byte b[], int off, int len) throws IOException
+    public void readFully(byte[] b, int off, int len) throws IOException
     {
         getDataInputStream().readFully(b, off, len);
     }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractVfsComponent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractVfsComponent.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractVfsComponent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractVfsComponent.java Fri Aug 14 15:56:52 2009
@@ -33,6 +33,7 @@
 
     /**
      * Sets the Logger to use for the component.
+     * @param log The Log to use.
      */
     public final void setLogger(final Log log)
     {
@@ -41,6 +42,7 @@
 
     /**
      * Sets the context for this file system provider.
+     * @param context The VfsComponentContext.
      */
     public final void setContext(final VfsComponentContext context)
     {
@@ -49,6 +51,7 @@
 
     /**
      * Initialises the component.  This implementation does nothing.
+     * @throws FileSystemException if an error occurs.
      */
     public void init() throws FileSystemException
     {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/CompositeFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/CompositeFileProvider.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/CompositeFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/CompositeFileProvider.java Fri Aug 14 15:56:52 2009
@@ -40,6 +40,11 @@
 
     /**
      * Locates a file object, by absolute URI.
+     * @param baseFile The base FileObject.
+     * @param uri The file to find.
+     * @param fileSystemOptions The options for the FileSystem.
+     * @return A FileObject for the located file.
+     * @throws FileSystemException if an error occurs.
      */
     public FileObject findFile(final FileObject baseFile,
                                final String uri,

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java?rev=804273&r1=804272&r2=804273&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java Fri Aug 14 15:56:52 2009
@@ -65,7 +65,7 @@
     /**
      * open streams counter for this file
      */
-    private int openStreams = 0;
+    private int openStreams;
 
     public DefaultFileContent(final AbstractFileObject file, final FileContentInfoFactory fileContentInfoFactory)
     {
@@ -111,6 +111,7 @@
 
     /**
      * Returns the file that this is the content of.
+     * @return the FileObject.
      */
     public FileObject getFile()
     {
@@ -119,6 +120,8 @@
 
     /**
      * Returns the size of the content (in bytes).
+     * @return The size of the content (in bytes).
+     * @throws FileSystemException if an error occurs.
      */
     public long getSize() throws FileSystemException
     {
@@ -147,6 +150,8 @@
 
     /**
      * Returns the last-modified timestamp.
+     * @return The last modified timestamp.
+     * @throws FileSystemException if an error occurs.
      */
     public long getLastModifiedTime() throws FileSystemException
     {
@@ -172,6 +177,8 @@
 
     /**
      * Sets the last-modified timestamp.
+     * @param modTime The last modified timestamp.
+     * @throws FileSystemException if an error occurs.
      */
     public void setLastModifiedTime(final long modTime) throws FileSystemException
     {
@@ -198,8 +205,11 @@
         }
     }
 
-   /**
+    /**
      * Checks if an attribute exists.
+     * @param attrName The name of the attribute to check.
+     * @return true if the attribute is associated with the file.
+     * @throws FileSystemException if an error occurs.
      */
     public boolean hasAttribute(final String attrName) throws FileSystemException
     {
@@ -213,6 +223,8 @@
 
     /**
      * Returns a read-only map of this file's attributes.
+     * @return a Map of the file's attributes.
+     * @throws FileSystemException if an error occurs.
      */
     public Map getAttributes() throws FileSystemException
     {
@@ -224,7 +236,7 @@
         {
             try
             {
-                synchronized(this)
+                synchronized (this)
                 {
                     attrs = file.doGetAttributes();
                     roAttrs = Collections.unmodifiableMap(attrs);
@@ -250,6 +262,8 @@
 
     /**
      * Lists the attributes of this file.
+     * @return An array of attribute names.
+     * @throws FileSystemException if an error occurs.
      */
     public String[] getAttributeNames() throws FileSystemException
     {
@@ -260,6 +274,9 @@
 
     /**
      * Gets the value of an attribute.
+     * @param attrName The attribute name.
+     * @return The value of the attribute or null.
+     * @throws FileSystemException if an error occurs.
      */
     public Object getAttribute(final String attrName)
         throws FileSystemException
@@ -270,6 +287,9 @@
 
     /**
      * Sets the value of an attribute.
+     * @param attrName The name of the attribute to add.
+     * @param value The value of the attribute.
+     * @throws FileSystemException if an error occurs.
      */
     public void setAttribute(final String attrName, final Object value)
         throws FileSystemException
@@ -295,6 +315,8 @@
 
     /**
      * Removes an attribute.
+     * @param attrName The name of the attribute to remove.
+     * @throws FileSystemException if an error occurs.
      */
     public void removeAttribute(final String attrName) throws FileSystemException
     {
@@ -320,6 +342,8 @@
 
     /**
      * Returns the certificates used to sign this file.
+     * @return An array of Certificates.
+     * @throws FileSystemException if an error occurs.
      */
     public Certificate[] getCertificates() throws FileSystemException
     {
@@ -354,6 +378,8 @@
 
     /**
      * Returns an input stream for reading the content.
+     * @return The InputStream
+     * @throws FileSystemException if an error occurs.
      */
     public InputStream getInputStream() throws FileSystemException
     {
@@ -379,6 +405,9 @@
     /**
      * Returns an input/output stream to use to read and write the content of the file in an
      * random manner.
+     * @param mode The RandomAccessMode.
+     * @return A RandomAccessContent object to access the file.
+     * @throws FileSystemException if an error occurs.
      */
     public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException
     {
@@ -402,6 +431,8 @@
 
     /**
      * Returns an output stream for writing the content.
+     * @return The OutputStream for the file.
+     * @throws FileSystemException if an error occurs.
      */
     public OutputStream getOutputStream() throws FileSystemException
     {
@@ -410,6 +441,9 @@
 
     /**
      * Returns an output stream for writing the content in append mode.
+     * @param bAppend true if the data written should be appended.
+     * @return The OutputStream for the file.
+     * @throws FileSystemException if an error occurs.
      */
     public OutputStream getOutputStream(boolean bAppend) throws FileSystemException
     {
@@ -435,6 +469,7 @@
     /**
      * Closes all resources used by the content, including all streams, readers
      * and writers.
+     * @throws FileSystemException if an error occurs.
      */
     public void close() throws FileSystemException
     {
@@ -677,6 +712,8 @@
 
     /**
      * get the content info. e.g. content-type, content-encoding
+     * @return The FileContentInfo.
+     * @throws FileSystemException if an error occurs.
      */
     public FileContentInfo getContentInfo() throws FileSystemException
     {



Mime
View raw message