Author: rgoers
Date: Sun Aug 16 08:02:15 2009
New Revision: 804644

URL: http://svn.apache.org/viewvc?rev=804644&view=rev
Log:
More checkstyle fixes

Modified:
    commons/proper/vfs/trunk/checkstyle.xml
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/UriParser.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponent.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponentContext.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/BZip2Constants.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileObject.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileSystem.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileProvider.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClient.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileNameParser.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpRandomAccessContent.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileObject.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileProvider.java
    
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileSystem.java

Modified: commons/proper/vfs/trunk/checkstyle.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/checkstyle.xml?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- commons/proper/vfs/trunk/checkstyle.xml (original)
+++ commons/proper/vfs/trunk/checkstyle.xml Sun Aug 16 08:02:15 2009
@@ -44,7 +44,7 @@
         </module>
         <module name="JavadocStyle">
             <property name="scope" value="public"/>
-        </module>     
+        </module>
 
 
         <!-- Checks for Naming Conventions.                  -->
@@ -149,7 +149,7 @@
         <module name="DefaultComesLast"/>
         <module name="FallThrough"/>
         <module name="MultipleVariableDeclarations"/>
-        <module name="UnnecessaryParentheses"/>
+        <!-- <module name="UnnecessaryParentheses"/> -->
 
         <!-- Checks for class design                         -->
         <!-- See http://checkstyle.sf.net/config_design.html -->

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/UriParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/UriParser.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/UriParser.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/UriParser.java
 Sun Aug 16 08:02:15 2009
@@ -32,23 +32,31 @@
 public final class UriParser
 {
     /**
-     * The normalised separator to use.
-     */
-    private static final char SEPARATOR_CHAR = FileName.SEPARATOR_CHAR;
-
-    /**
      * The set of valid separators. These are all converted to the normalised
      * one. Does <i>not</i> contain the normalised separator
      */
     // public static final char[] separators = {'\\'};
     public static final char TRANS_SEPARATOR = '\\';
 
+    /**
+     * The normalised separator to use.
+     */
+    private static final char SEPARATOR_CHAR = FileName.SEPARATOR_CHAR;
+
+    private static final int HEX_BASE = 16;
+
+    private static final int BITS_IN_HALF_BYTE = 4;
+
+    private static final char LOW_MASK = 0x0F;
+
     private UriParser()
     {
     }
 
     /**
      * Extracts the first element of a path.
+     * @param name StringBuffer containing the path.
+     * @return The first element of the path.
      */
     public static String extractFirstElement(final StringBuffer name)
     {
@@ -89,6 +97,10 @@
      *
      * Its assumed that the separators are already fixed.
      *
+     * @param path The path to normalize.
+     * @return The FileType.
+     * @throws FileSystemException if an error occurs.
+     *
      *  @see #fixSeparators
      */
     public static FileType normalisePath(final StringBuffer path)
@@ -187,6 +199,8 @@
 
     /**
      * Normalises the separators in a name.
+     * @param name The StringBuffer containing the name
+     * @return true if the StringBuffer was modified.
      */
     public static boolean fixSeparators(final StringBuffer name)
     {
@@ -207,8 +221,7 @@
     /**
      * Extracts the scheme from a URI.
      *
-     * @param uri
-     *            The URI.
+     * @param uri The URI.
      * @return The scheme name. Returns null if there is no scheme.
      */
     public static String extractScheme(final String uri)
@@ -220,14 +233,11 @@
      * Extracts the scheme from a URI. Removes the scheme and ':' delimiter 
from
      * the front of the URI.
      *
-     * @param uri
-     *            The URI.
-     * @param buffer
-     *            Returns the remainder of the URI.
+     * @param uri The URI.
+     * @param buffer Returns the remainder of the URI.
      * @return The scheme name. Returns null if there is no scheme.
      */
-    public static String extractScheme(final String uri,
-            final StringBuffer buffer)
+    public static String extractScheme(final String uri, final StringBuffer 
buffer)
     {
         if (buffer != null)
         {
@@ -280,6 +290,9 @@
 
     /**
      * Removes %nn encodings from a string.
+     * @param encodedStr The encoded String.
+     * @return The decoded String.
+     * @throws FileSystemException if an error occurs.
      */
     public static String decode(final String encodedStr)
             throws FileSystemException
@@ -299,9 +312,13 @@
 
     /**
      * Removes %nn encodings from a string.
+     * @param buffer StringBuffer containing the string to decode.
+     * @param offset The position in the string to start decoding.
+     * @param length The number of characters to decode.
+     * @throws FileSystemException if an error occurs.
      */
-    public static void decode(final StringBuffer buffer, final int offset,
-            final int length) throws FileSystemException
+    public static void decode(final StringBuffer buffer, final int offset, 
final int length)
+            throws FileSystemException
     {
         int index = offset;
         int count = length;
@@ -320,15 +337,15 @@
             }
 
             // Decode
-            int dig1 = Character.digit(buffer.charAt(index + 1), 16);
-            int dig2 = Character.digit(buffer.charAt(index + 2), 16);
+            int dig1 = Character.digit(buffer.charAt(index + 1), HEX_BASE);
+            int dig2 = Character.digit(buffer.charAt(index + 2), HEX_BASE);
             if (dig1 == -1 || dig2 == -1)
             {
                 throw new FileSystemException(
                         "vfs.provider/invalid-escape-sequence.error", buffer
                                 .substring(index, index + 3));
             }
-            char value = (char) (dig1 << 4 | dig2);
+            char value = (char) (dig1 << BITS_IN_HALF_BYTE | dig2);
 
             // Replace
             buffer.setCharAt(index, value);
@@ -339,6 +356,9 @@
 
     /**
      * Encodes and appends a string to a StringBuffer.
+     * @param buffer The StringBuffer to append to.
+     * @param unencodedValue The String to encode and append.
+     * @param reserved characters to encode.
      */
     public static void appendEncoded(final StringBuffer buffer,
             final String unencodedValue, final char[] reserved)
@@ -351,6 +371,10 @@
     /**
      * Encodes a set of reserved characters in a StringBuffer, using the URI 
%nn
      * encoding. Always encodes % characters.
+     * @param buffer The StringBuffer to append to.
+     * @param offset The position in the buffer to start encoding at.
+     * @param length The number of characters to encode.
+     * @param reserved characters to encode.
      */
     public static void encode(final StringBuffer buffer, final int offset,
             final int length, final char[] reserved)
@@ -360,7 +384,7 @@
         for (; count > 0; index++, count--)
         {
             final char ch = buffer.charAt(index);
-            boolean match = (ch == '%');
+            boolean match = ch == '%';
             if (reserved != null)
             {
                 for (int i = 0; !match && i < reserved.length; i++)
@@ -375,8 +399,8 @@
             {
                 // Encode
                 char[] digits =
-                { Character.forDigit(((ch >> 4) & 0xF), 16),
-                        Character.forDigit((ch & 0xF), 16) };
+                    {Character.forDigit(((ch >> BITS_IN_HALF_BYTE) & 
LOW_MASK), HEX_BASE),
+                     Character.forDigit((ch & LOW_MASK), HEX_BASE)};
                 buffer.setCharAt(index, '%');
                 buffer.insert(index + 1, digits);
                 index += 2;
@@ -386,12 +410,20 @@
 
     /**
      * Removes %nn encodings from a string.
+     * @param decodedStr The decoded String.
+     * @return The encoded String.
      */
     public static String encode(final String decodedStr)
     {
         return encode(decodedStr, null);
     }
 
+    /**
+     * Converts "special" characters to their %nn value.
+     * @param decodedStr The decoded String.
+     * @param reserved Characters to encode.
+     * @return The encoded String
+     */
     public static String encode(final String decodedStr, final char[] reserved)
     {
         if (decodedStr == null)
@@ -403,6 +435,11 @@
         return buffer.toString();
     }
 
+    /**
+     * Encode an array of Strings.
+     * @param strings The array of Strings to encode.
+     * @return An array of encoded Strings.
+     */
     public static String[] encode(String[] strings)
     {
         if (strings == null)
@@ -416,6 +453,11 @@
         return strings;
     }
 
+    /**
+     * Decodes the String.
+     * @param uri The String to decode.
+     * @throws FileSystemException if an error occurs.
+     */
     public static void checkUriEncoding(String uri) throws FileSystemException
     {
         decode(uri);
@@ -440,19 +482,18 @@
                 }
 
                 // Decode
-                int dig1 = Character.digit(buffer.charAt(index + 1), 16);
-                int dig2 = Character.digit(buffer.charAt(index + 2), 16);
+                int dig1 = Character.digit(buffer.charAt(index + 1), HEX_BASE);
+                int dig2 = Character.digit(buffer.charAt(index + 2), HEX_BASE);
                 if (dig1 == -1 || dig2 == -1)
                 {
                     throw new FileSystemException(
                             "vfs.provider/invalid-escape-sequence.error",
                             buffer.substring(index, index + 3));
                 }
-                char value = (char) (dig1 << 4 | dig2);
+                char value = (char) (dig1 << BITS_IN_HALF_BYTE | dig2);
 
-                boolean match = (value == '%')
-                        || (fileNameParser != null && fileNameParser
-                                .encodeCharacter(value));
+                boolean match = value == '%'
+                        || (fileNameParser != null && 
fileNameParser.encodeCharacter(value));
 
                 if (match)
                 {
@@ -471,8 +512,8 @@
             {
                 // Encode
                 char[] digits =
-                { Character.forDigit(((ch >> 4) & 0xF), 16),
-                        Character.forDigit((ch & 0xF), 16) };
+                    {Character.forDigit(((ch >> BITS_IN_HALF_BYTE) & 
LOW_MASK), HEX_BASE),
+                     Character.forDigit((ch & LOW_MASK), HEX_BASE) };
                 buffer.setCharAt(index, '%');
                 buffer.insert(index + 1, digits);
                 index += 2;
@@ -480,6 +521,11 @@
         }
     }
 
+    /**
+     * Extract the query String from the URI.
+     * @param name StringBuffer containing the URI.
+     * @return The query string, if any. null otherwise.
+     */
     public static String extractQueryString(StringBuffer name)
     {
         for (int pos = 0; pos < name.length(); pos++)

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponent.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponent.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponent.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponent.java
 Sun Aug 16 08:02:15 2009
@@ -37,7 +37,7 @@
     /**
      * Sets the Logger to use for the component.
      *
-     * @param logger
+     * @param logger The Log
      */
     void setLogger(Log logger);
 
@@ -50,6 +50,7 @@
 
     /**
      * Initialises the component.
+     * @throws FileSystemException if an error occurs.
      */
     void init() throws FileSystemException;
 

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponentContext.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponentContext.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponentContext.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/VfsComponentContext.java
 Sun Aug 16 08:02:15 2009
@@ -39,6 +39,11 @@
      * Locate a file by name.  See
      * {...@link FileSystemManager#resolveFile(FileObject, String)} for a
      * description of how this works.
+     * @param baseFile The base FileObject.
+     * @param name The name of the file to locate.
+     * @param fileSystemOptions The FileSystemOptions.
+     * @return The FileObject for the located file.
+     * @throws FileSystemException if an error occurs.
      */
     FileObject resolveFile(FileObject baseFile, String name, FileSystemOptions 
fileSystemOptions)
         throws FileSystemException;
@@ -47,30 +52,46 @@
      * Locate a file by name.  See
      * {...@link FileSystemManager#resolveFile( String)} for a
      * description of how this works.
+     * @param name The name of the file to locate.
+     * @param fileSystemOptions The FileSystemOptions.
+     * @return The FileObject for the located file.
+     * @throws FileSystemException if an error occurs.
      */
     FileObject resolveFile(String name, FileSystemOptions fileSystemOptions)
         throws FileSystemException;
 
+    /**
+     * Parse a URI into a FileName.
+     * @param uri The URI String.
+     * @return The FileName.
+     * @throws FileSystemException if an error occurs.
+     */
     FileName parseURI(String uri) throws FileSystemException;
 
     /**
      * Locates a file replicator for the provider to use.
+     * @return The FileReplicator.
+     * @throws FileSystemException if an error occurs.
      */
     FileReplicator getReplicator() throws FileSystemException;
 
     /**
      * Locates a temporary file store for the provider to use.
+     * @return The TemporaryFileStore.
+     * @throws FileSystemException if an error occurs.
      */
     TemporaryFileStore getTemporaryFileStore() throws FileSystemException;
 
     /**
      * Returns a {...@link FileObject} for a local file.
+     * @param file The File to convert to a FileObject.
+     * @return the FileObject.
+     * @throws FileSystemException if an error occurs.
      */
-    FileObject toFileObject(File file)
-        throws FileSystemException;
+    FileObject toFileObject(File file) throws FileSystemException;
 
     /**
-     * Returns the filesystem manager for the current context
+     * Returns the filesystem manager for the current context.
      *
      * @return the filesystem manager
      */

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/BZip2Constants.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/BZip2Constants.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/BZip2Constants.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/BZip2Constants.java
 Sun Aug 16 08:02:15 2009
@@ -39,7 +39,7 @@
     int N_GROUPS = 6;
     int G_SIZE = 50;
     int N_ITERS = 4;
-    int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) );
+    int MAX_SELECTORS = (2 + (900000 / G_SIZE));
     int NUM_OVERSHOOT_BYTES = 20;
 
     int[] RAND_NUMS = new int[]

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileObject.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileObject.java
 Sun Aug 16 08:02:15 2009
@@ -30,7 +30,7 @@
 import java.io.OutputStream;
 
 /**
- * the bzip2 file
+ * the bzip2 file.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileProvider.java
 Sun Aug 16 08:02:15 2009
@@ -29,14 +29,14 @@
 import java.util.Collections;
 
 /**
- * Provides access to the content of bzip2 compressed files
+ * Provides access to the content of bzip2 compressed files.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
 public class Bzip2FileProvider extends CompressedFileFileProvider
 {
-    protected final static Collection capabilities =
+    protected static final Collection capabilities =
             Collections.unmodifiableCollection(Arrays.asList(new Capability[]
                     {
                             Capability.GET_LAST_MODIFIED,

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileSystem.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileSystem.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileSystem.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/bzip2/Bzip2FileSystem.java
 Sun Aug 16 08:02:15 2009
@@ -25,7 +25,7 @@
 import java.util.Collection;
 
 /**
- * Filesytem to handle compressed files using the bzip2 method
+ * Filesytem to handle compressed files using the bzip2 method.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileObject.java
 Sun Aug 16 08:02:15 2009
@@ -57,6 +57,7 @@
      * Determines if this file can be written to.
      *
      * @return <code>true</code> if this file is writeable, <code>false</code> 
if not.
+     * @throws FileSystemException if an error occurs.
      */
     public boolean isWriteable() throws FileSystemException
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileProvider.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileProvider.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileProvider.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/compressed/CompressedFileFileProvider.java
 Sun Aug 16 08:02:15 2009
@@ -75,7 +75,9 @@
         return createFileSystem(name, file, fileSystemOptions);
     }
 
-    protected abstract FileSystem createFileSystem(final FileName name, final 
FileObject file, final FileSystemOptions fileSystemOptions) throws 
FileSystemException;
+    protected abstract FileSystem createFileSystem(final FileName name, final 
FileObject file,
+                                                   final FileSystemOptions 
fileSystemOptions)
+        throws FileSystemException;
 
     public abstract Collection getCapabilities();
 }

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java
 Sun Aug 16 08:02:15 2009
@@ -30,14 +30,16 @@
 
 /**
  * A wrapper to the FTPClient to allow automatic reconnect on connection 
loss.<br />
- * I decided to not to use eg. noop() to determine the state of the connection 
to avoid unnecesary server round-trips.
+ * I decided to not to use eg. noop() to determine the state of the connection 
to avoid
+ * unnecesary server round-trips.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
  */
 class FTPClientWrapper implements FtpClient
 {
     private final GenericFileName root;
     private final FileSystemOptions fileSystemOptions;
 
-    private FTPClient ftpClient = null;
+    private FTPClient ftpClient;
 
     FTPClientWrapper(final GenericFileName root, final FileSystemOptions 
fileSystemOptions) throws FileSystemException
     {
@@ -67,8 +69,10 @@
 
             return FtpClientFactory.createConnection(rootName.getHostName(),
                 rootName.getPort(),
-                UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.USERNAME, 
UserAuthenticatorUtils.toChar(rootName.getUserName())),
-                UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.PASSWORD, 
UserAuthenticatorUtils.toChar(rootName.getPassword())),
+                UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.USERNAME,
+                        UserAuthenticatorUtils.toChar(rootName.getUserName())),
+                UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.PASSWORD,
+                        UserAuthenticatorUtils.toChar(rootName.getPassword())),
                 rootName.getPath(),
                 getFileSystemOptions());
         }
@@ -138,7 +142,8 @@
 
         if (relPath != null && 
!getFtpClient().changeWorkingDirectory(workingDirectory))
         {
-            throw new 
FileSystemException("vfs.provider.ftp.wrapper/change-work-directory-back.error",
 workingDirectory);
+            throw new 
FileSystemException("vfs.provider.ftp.wrapper/change-work-directory-back.error",
+                    workingDirectory);
         }
         return files;
     }
@@ -285,4 +290,4 @@
     {
         return getFtpClient().getReplyString();
     }
-}
\ No newline at end of file
+}

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClient.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClient.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClient.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClient.java
 Sun Aug 16 08:02:15 2009
@@ -25,6 +25,7 @@
 
 /**
  * What VFS expects from an ftp client to provide.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
  */
 public interface FtpClient
 {
@@ -52,7 +53,7 @@
 
     OutputStream storeFileStream(String relPath) throws IOException;
 
-    public boolean abort() throws IOException;
+    boolean abort() throws IOException;
 
-    public String getReplyString() throws IOException;
-}
\ No newline at end of file
+    String getReplyString() throws IOException;
+}

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
 Sun Aug 16 08:02:15 2009
@@ -28,21 +28,32 @@
 import java.io.IOException;
 
 /**
- * Create a FtpClient instance
+ * Create a FtpClient instance.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class FtpClientFactory
+public final class FtpClientFactory
 {
+    private static final int BUFSZ = 40;
     private FtpClientFactory()
     {
     }
 
     /**
      * Creates a new connection to the server.
+     * @param hostname The host name of the server.
+     * @param port The port to connect to.
+     * @param username The name of the user for authentication.
+     * @param password The user's password.
+     * @param workingDirectory The base directory.
+     * @param fileSystemOptions The FileSystemOptions.
+     * @return An FTPClient.
+     * @throws FileSystemException if an error occurs while connecting.
      */
-    public static FTPClient createConnection(String hostname, int port, char[] 
username, char[] password, String workingDirectory, FileSystemOptions 
fileSystemOptions) throws FileSystemException
+    public static FTPClient createConnection(String hostname, int port, char[] 
username, char[] password,
+                                             String workingDirectory, 
FileSystemOptions fileSystemOptions)
+            throws FileSystemException
     {
         // Determine the username and password to use
         if (username == null)
@@ -64,33 +75,38 @@
             {
                 FTPClientConfig config = new FTPClientConfig(key);
 
-                String serverLanguageCode = 
FtpFileSystemConfigBuilder.getInstance().getServerLanguageCode(fileSystemOptions);
+                String serverLanguageCode =
+                        
FtpFileSystemConfigBuilder.getInstance().getServerLanguageCode(fileSystemOptions);
                 if (serverLanguageCode != null)
                 {
                     config.setServerLanguageCode(serverLanguageCode);
                 }
-                String defaultDateFormat = 
FtpFileSystemConfigBuilder.getInstance().getDefaultDateFormat(fileSystemOptions);
+                String defaultDateFormat =
+                        
FtpFileSystemConfigBuilder.getInstance().getDefaultDateFormat(fileSystemOptions);
                 if (defaultDateFormat != null)
                 {
                     config.setDefaultDateFormatStr(defaultDateFormat);
                 }
-                String recentDateFormat = 
FtpFileSystemConfigBuilder.getInstance().getRecentDateFormat(fileSystemOptions);
+                String recentDateFormat =
+                        
FtpFileSystemConfigBuilder.getInstance().getRecentDateFormat(fileSystemOptions);
                 if (recentDateFormat != null)
                 {
                     config.setRecentDateFormatStr(recentDateFormat);
                 }
-                String serverTimeZoneId = 
FtpFileSystemConfigBuilder.getInstance().getServerTimeZoneId(fileSystemOptions);
+                String serverTimeZoneId =
+                        
FtpFileSystemConfigBuilder.getInstance().getServerTimeZoneId(fileSystemOptions);
                 if (serverTimeZoneId != null)
                 {
                     config.setServerTimeZoneId(serverTimeZoneId);
                 }
-                String[] shortMonthNames = 
FtpFileSystemConfigBuilder.getInstance().getShortMonthNames(fileSystemOptions);
+                String[] shortMonthNames =
+                        
FtpFileSystemConfigBuilder.getInstance().getShortMonthNames(fileSystemOptions);
                 if (shortMonthNames != null)
                 {
-                    StringBuffer shortMonthNamesStr = new StringBuffer(40);
-                    for (int i = 0; i<shortMonthNames.length; i++)
+                    StringBuffer shortMonthNamesStr = new StringBuffer(BUFSZ);
+                    for (int i = 0; i < shortMonthNames.length; i++)
                     {
-                        if (shortMonthNamesStr.length()>0)
+                        if (shortMonthNamesStr.length() > 0)
                         {
                             shortMonthNamesStr.append("|");
                         }
@@ -102,7 +118,8 @@
                 client.configure(config);
             }
 
-            FTPFileEntryParserFactory myFactory = 
FtpFileSystemConfigBuilder.getInstance().getEntryParserFactory(fileSystemOptions);
+            FTPFileEntryParserFactory myFactory =
+                    
FtpFileSystemConfigBuilder.getInstance().getEntryParserFactory(fileSystemOptions);
             if (myFactory != null)
             {
                 client.setParserFactory(myFactory);
@@ -123,7 +140,8 @@
                     UserAuthenticatorUtils.toString(username),
                     UserAuthenticatorUtils.toString(password)))
                 {
-                    throw new 
FileSystemException("vfs.provider.ftp/login.error", new Object[]{hostname, 
UserAuthenticatorUtils.toString(username)}, null);
+                    throw new 
FileSystemException("vfs.provider.ftp/login.error",
+                            new Object[]{hostname, 
UserAuthenticatorUtils.toString(username)}, null);
                 }
 
                 // Set binary mode
@@ -174,4 +192,4 @@
             throw new FileSystemException("vfs.provider.ftp/connect.error", 
new Object[]{hostname}, exc);
         }
     }
-}
\ No newline at end of file
+}

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileNameParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileNameParser.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileNameParser.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileNameParser.java
 Sun Aug 16 08:02:15 2009
@@ -21,14 +21,17 @@
 
 /**
  * Implementation for ftp. set default port to 21
+ * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
  */
 public class FtpFileNameParser extends HostFileNameParser
 {
-    private final static FtpFileNameParser INSTANCE = new FtpFileNameParser();
+    private static final FtpFileNameParser INSTANCE = new FtpFileNameParser();
+
+    private static final int PORT = 21;
 
     public FtpFileNameParser()
     {
-        super(21);
+        super(PORT);
     }
 
     public static FileNameParser getInstance()

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
 Sun Aug 16 08:02:15 2009
@@ -52,20 +52,19 @@
 public class FtpFileObject
     extends AbstractFileObject
 {
-    private Log log = LogFactory.getLog(FtpFileObject.class);
-
     private static final Map EMPTY_FTP_FILE_MAP = 
Collections.unmodifiableMap(new TreeMap());
+    private static final FTPFile UNKNOWN = new FTPFile();
 
+    private Log log = LogFactory.getLog(FtpFileObject.class);
     private final FtpFileSystem ftpFs;
     private final String relPath;
 
     // Cached info
-    private final static FTPFile UNKNOWN = new FTPFile();
     private FTPFile fileInfo;
     private Map children;
     private FileObject linkDestination;
 
-    private boolean inRefresh = false;
+    private boolean inRefresh;
 
     protected FtpFileObject(final FileName name,
                             final FtpFileSystem fileSystem,
@@ -134,7 +133,10 @@
         final FtpClient client = ftpFs.getClient();
         try
         {
-            final String path = fileInfo != null && fileInfo.isSymbolicLink() 
? getFileSystem().getFileSystemManager().resolveName(getParent().getName(), 
fileInfo.getLink() ).getPath() : relPath;
+            final String path = fileInfo != null && fileInfo.isSymbolicLink()
+                ? getFileSystem().getFileSystemManager().
+                    resolveName(getParent().getName(), 
fileInfo.getLink()).getPath()
+                : relPath;
             final FTPFile[] tmpChildren = client.listFiles(path);
             if (tmpChildren == null || tmpChildren.length == 0)
             {
@@ -213,7 +215,7 @@
     }
 
     /**
-     * @throws FileSystemException
+     * @throws FileSystemException if an error occurs.
      */
     public void refresh() throws FileSystemException
     {
@@ -500,7 +502,8 @@
 
             if (!ok)
             {
-                throw new 
FileSystemException("vfs.provider.ftp/rename-file.error", new 
Object[]{getName().toString(), newfile});
+                throw new 
FileSystemException("vfs.provider.ftp/rename-file.error",
+                        new Object[]{getName().toString(), newfile});
             }
             this.fileInfo = null;
             children = EMPTY_FTP_FILE_MAP;

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java
 Sun Aug 16 08:02:15 2009
@@ -39,9 +39,20 @@
 public class FtpFileProvider
     extends AbstractOriginatingFileProvider
 {
-    public final static String ATTR_FILE_ENTRY_PARSER = "FEP";
+    /**
+     * File Entry Parser.
+     */
+    public static final String ATTR_FILE_ENTRY_PARSER = "FEP";
+
+    /**
+     * Authenticator types.
+     */
+    public static final UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = 
new UserAuthenticationData.Type[]
+        {
+            UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD
+        };
 
-    final static Collection capabilities = 
Collections.unmodifiableCollection(Arrays.asList(new Capability[]
+    static final Collection capabilities = 
Collections.unmodifiableCollection(Arrays.asList(new Capability[]
     {
         Capability.CREATE,
         Capability.DELETE,
@@ -56,11 +67,6 @@
         Capability.RANDOM_ACCESS_READ,
     }));
 
-    public final static UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = 
new UserAuthenticationData.Type[]
-        {
-            UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWORD
-        };
-
     public FtpFileProvider()
     {
         super();

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
 Sun Aug 16 08:02:15 2009
@@ -38,7 +38,7 @@
 public class FtpFileSystem
     extends AbstractFileSystem
 {
-    private final static Log log = LogFactory.getLog(FtpFileSystem.class);
+    private static final Log LOG = LogFactory.getLog(FtpFileSystem.class);
 
 //    private final String hostname;
 //    private final int port;
@@ -48,7 +48,8 @@
     // An idle client
     private FtpClient idleClient;
 
-    protected FtpFileSystem(final GenericFileName rootName, final FtpClient 
ftpClient, final FileSystemOptions fileSystemOptions)
+    protected FtpFileSystem(final GenericFileName rootName, final FtpClient 
ftpClient,
+                            final FileSystemOptions fileSystemOptions)
     {
         super(rootName, null, fileSystemOptions);
         // hostname = rootName.getHostName();
@@ -91,12 +92,14 @@
         catch (final IOException e)
         {
             // getLogger().warn("vfs.provider.ftp/close-connection.error", e);
-            VfsLog.warn(getLogger(), log, 
"vfs.provider.ftp/close-connection.error", e);
+            VfsLog.warn(getLogger(), LOG, 
"vfs.provider.ftp/close-connection.error", e);
         }
     }
 
     /**
      * Creates an FTP client to use.
+     * @return An FTPCleint.
+     * @throws FileSystemException if an error occurs.
      */
     public FtpClient getClient() throws FileSystemException
     {
@@ -106,18 +109,7 @@
                 {
                     idleClient = null;
 
-                    FtpClient ftpClient = new 
FTPClientWrapper((GenericFileName) getRoot().getName(), getFileSystemOptions());
-                    return ftpClient;
-                    /*
-                    final GenericFileName rootName = (GenericFileName) 
getRoot().getName();
-
-                    return 
FtpClientFactory.createConnection(rootName.getHostName(),
-                        rootName.getPort(),
-                        rootName.getUserName(),
-                        rootName.getPassword(),
-                        rootName.getPath(),
-                        getFileSystemOptions());
-                    */
+                    return new FTPClientWrapper((GenericFileName) 
getRoot().getName(), getFileSystemOptions());
                 }
                 else
                 {
@@ -130,6 +122,7 @@
 
     /**
      * Returns an FTP client after use.
+     * @param client The FTPClient.
      */
     public void putClient(final FtpClient client)
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java
 Sun Aug 16 08:02:15 2009
@@ -21,40 +21,45 @@
 import org.apache.commons.vfs.FileSystemOptions;
 
 /**
- * The config builder for various ftp configuration options
+ * The config builder for various ftp configuration options.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
-public class FtpFileSystemConfigBuilder extends FileSystemConfigBuilder
+public final class FtpFileSystemConfigBuilder extends FileSystemConfigBuilder
 {
-    private final static FtpFileSystemConfigBuilder builder = new 
FtpFileSystemConfigBuilder();
+    private static final FtpFileSystemConfigBuilder builder = new 
FtpFileSystemConfigBuilder();
 
-    private final static String FACTORY_KEY = 
FTPFileEntryParserFactory.class.getName() + ".KEY";
-    private final static String PASSIVE_MODE = 
FtpFileSystemConfigBuilder.class.getName() + ".PASSIVE";
-    private final static String USER_DIR_IS_ROOT = 
FtpFileSystemConfigBuilder.class.getName() + ".USER_DIR_IS_ROOT";
-    private final static String DATA_TIMEOUT = 
FtpFileSystemConfigBuilder.class.getName() + ".DATA_TIMEOUT";
-
-    private final static String SERVER_LANGUAGE_CODE = 
FtpFileSystemConfigBuilder.class.getName() + ".SERVER_LANGUAGE_CODE";
-    private final static String DEFAULT_DATE_FORMAT = 
FtpFileSystemConfigBuilder.class.getName() + ".DEFAULT_DATE_FORMAT";
-    private final static String RECENT_DATE_FORMAT = 
FtpFileSystemConfigBuilder.class.getName() + ".RECENT_DATE_FORMAT";
-    private final static String SERVER_TIME_ZONE_ID = 
FtpFileSystemConfigBuilder.class.getName() + ".SERVER_TIME_ZONE_ID";
-    private final static String SHORT_MONTH_NAMES = 
FtpFileSystemConfigBuilder.class.getName() + ".SHORT_MONTH_NAMES";
+    private static final String FACTORY_KEY = 
FTPFileEntryParserFactory.class.getName() + ".KEY";
+    private static final String PASSIVE_MODE = 
FtpFileSystemConfigBuilder.class.getName() + ".PASSIVE";
+    private static final String USER_DIR_IS_ROOT = 
FtpFileSystemConfigBuilder.class.getName() + ".USER_DIR_IS_ROOT";
+    private static final String DATA_TIMEOUT = 
FtpFileSystemConfigBuilder.class.getName() + ".DATA_TIMEOUT";
+
+    private static final String SERVER_LANGUAGE_CODE =
+            FtpFileSystemConfigBuilder.class.getName() + 
".SERVER_LANGUAGE_CODE";
+    private static final String DEFAULT_DATE_FORMAT =
+            FtpFileSystemConfigBuilder.class.getName() + 
".DEFAULT_DATE_FORMAT";
+    private static final String RECENT_DATE_FORMAT =
+            FtpFileSystemConfigBuilder.class.getName() + ".RECENT_DATE_FORMAT";
+    private static final String SERVER_TIME_ZONE_ID =
+            FtpFileSystemConfigBuilder.class.getName() + 
".SERVER_TIME_ZONE_ID";
+    private static final String SHORT_MONTH_NAMES =
+            FtpFileSystemConfigBuilder.class.getName() + ".SHORT_MONTH_NAMES";
 
-    public static FtpFileSystemConfigBuilder getInstance()
+    private FtpFileSystemConfigBuilder()
     {
-        return builder;
+        super("ftp.");
     }
 
-    private FtpFileSystemConfigBuilder()
+    public static FtpFileSystemConfigBuilder getInstance()
     {
-        super("ftp.");
+        return builder;
     }
 
     /**
-     * FTPFileEntryParserFactory which will be used for ftp-entry parsing
+     * FTPFileEntryParserFactory which will be used for ftp-entry parsing.
      *
-     * @param opts
+     * @param opts The FileSystemOptions.
      * @param factory instance of your factory
      */
     public void setEntryParserFactory(FileSystemOptions opts, 
FTPFileEntryParserFactory factory)
@@ -63,8 +68,9 @@
     }
 
     /**
-     * @param opts
+     * @param opts The FlleSystemOptions.
      * @see #setEntryParserFactory
+     * @return An FTPFileEntryParserFactory.
      */
     public FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions 
opts)
     {
@@ -74,11 +80,12 @@
     /**
      * set the FQCN of your FileEntryParser used to parse the directory 
listing from your server.<br />
      * <br />
-     * <i>If you do not use the default commons-net FTPFileEntryParserFactory 
e.g. by using {...@link #setEntryParserFactory}
+     * <i>If you do not use the default commons-net FTPFileEntryParserFactory 
e.g. by using
+     * {...@link #setEntryParserFactory}
      * this is the "key" parameter passed as argument into your custom 
factory</i>
      *
-     * @param opts
-     * @param key
+     * @param opts The FileSystemOptions.
+     * @param key The key.
      */
     public void setEntryParser(FileSystemOptions opts, String key)
     {
@@ -86,8 +93,9 @@
     }
 
     /**
-     * @param opts
+     * @param opts The FileSystemOptions.
      * @see #setEntryParser
+     * @return the key to the EntryParser.
      */
     public String getEntryParser(FileSystemOptions opts)
     {
@@ -100,10 +108,10 @@
     }
 
     /**
-     * enter into passive mode
+     * enter into passive mode.
      *
-     * @param opts
-     * @param passiveMode
+     * @param opts The FileSystemOptions.
+     * @param passiveMode true if passive mode should be used.
      */
     public void setPassiveMode(FileSystemOptions opts, boolean passiveMode)
     {
@@ -111,7 +119,8 @@
     }
 
     /**
-     * @param opts
+     * @param opts The FileSystemOptions.
+     * @return true if passive mode is set.
      * @see #setPassiveMode
      */
     public Boolean getPassiveMode(FileSystemOptions opts)
@@ -120,10 +129,10 @@
     }
 
     /**
-     * use user directory as root (do not change to fs root)
+     * use user directory as root (do not change to fs root).
      *
-     * @param opts
-     * @param userDirIsRoot
+     * @param opts The FileSystemOptions.
+     * @param userDirIsRoot true if the user directory should be treated as 
the root.
      */
     public void setUserDirIsRoot(FileSystemOptions opts, boolean userDirIsRoot)
     {
@@ -131,7 +140,8 @@
     }
 
     /**
-     * @param opts
+     * @param opts The FileSystemOptions.
+     * @return true if the user directory is treated as the root.
      * @see #setUserDirIsRoot
      */
     public Boolean getUserDirIsRoot(FileSystemOptions opts)
@@ -140,7 +150,8 @@
     }
 
     /**
-     * @param opts
+     * @param opts The FileSystemOptions.
+     * @return The timeout as an Integer.
      * @see #setDataTimeout
      */
     public Integer getDataTimeout(FileSystemOptions opts)
@@ -153,8 +164,8 @@
      * If you set the dataTimeout to <code>null</code> no dataTimeout will be 
set on the
      * ftp client.
      *
-     * @param opts
-     * @param dataTimeout
+     * @param opts The FileSystemOptions.
+     * @param dataTimeout The timeout value.
      */
     public void setDataTimeout(FileSystemOptions opts, Integer dataTimeout)
     {
@@ -164,6 +175,8 @@
     /**
      * get the language code used by the server. see {...@link 
org.apache.commons.net.ftp.FTPClientConfig}
      * for details and examples.
+     * @param opts The FilesystemOptions.
+     * @return The language code of the server.
      */
     public String getServerLanguageCode(FileSystemOptions opts)
     {
@@ -173,6 +186,8 @@
     /**
      * set the language code used by the server. see {...@link 
org.apache.commons.net.ftp.FTPClientConfig}
      * for details and examples.
+     * @param opts The FileSystemOptions.
+     * @param serverLanguageCode The servers language code.
      */
     public void setServerLanguageCode(FileSystemOptions opts, String 
serverLanguageCode)
     {
@@ -182,6 +197,8 @@
     /**
      * get the language code used by the server. see {...@link 
org.apache.commons.net.ftp.FTPClientConfig}
      * for details and examples.
+     * @param opts The FileSystemOptions
+     * @return The default date format.
      */
     public String getDefaultDateFormat(FileSystemOptions opts)
     {
@@ -191,6 +208,8 @@
     /**
      * set the language code used by the server. see {...@link 
org.apache.commons.net.ftp.FTPClientConfig}
      * for details and examples.
+     * @param opts The FileSystemOptions.
+     * @param defaultDateFormat The default date format.
      */
     public void setDefaultDateFormat(FileSystemOptions opts, String 
defaultDateFormat)
     {
@@ -199,6 +218,8 @@
 
     /**
      * see {...@link org.apache.commons.net.ftp.FTPClientConfig} for details 
and examples.
+     * @param opts The FileSystemOptions.
+     * @return The recent date format.
      */
     public String getRecentDateFormat(FileSystemOptions opts)
     {
@@ -207,6 +228,8 @@
 
     /**
      * see {...@link org.apache.commons.net.ftp.FTPClientConfig} for details 
and examples.
+     * @param opts The FileSystemOptions.
+     * @param recentDateFormat The recent date format.
      */
     public void setRecentDateFormat(FileSystemOptions opts, String 
recentDateFormat)
     {
@@ -215,6 +238,8 @@
 
     /**
      * see {...@link org.apache.commons.net.ftp.FTPClientConfig} for details 
and examples.
+     * @param opts The FileSystemOptions.
+     * @return The server timezone id.
      */
     public String getServerTimeZoneId(FileSystemOptions opts)
     {
@@ -223,6 +248,8 @@
 
     /**
      * see {...@link org.apache.commons.net.ftp.FTPClientConfig} for details 
and examples.
+     * @param opts The FileSystemOptions.
+     * @param serverTimeZoneId The server timezone id.
      */
     public void setServerTimeZoneId(FileSystemOptions opts, String 
serverTimeZoneId)
     {
@@ -231,6 +258,8 @@
 
     /**
      * see {...@link org.apache.commons.net.ftp.FTPClientConfig} for details 
and examples.
+     * @param opts The FileSystemOptions.
+     * @return An array of short month names.
      */
     public String[] getShortMonthNames(FileSystemOptions opts)
     {
@@ -239,6 +268,8 @@
 
     /**
      * see {...@link org.apache.commons.net.ftp.FTPClientConfig} for details 
and examples.
+     * @param opts The FileSystemOptions.
+     * @param shortMonthNames an array of short month name Strings.
      */
     public void setShortMonthNames(FileSystemOptions opts, String[] 
shortMonthNames)
     {

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpRandomAccessContent.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpRandomAccessContent.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpRandomAccessContent.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/ftp/FtpRandomAccessContent.java
 Sun Aug 16 08:02:15 2009
@@ -24,13 +24,16 @@
 import java.io.FilterInputStream;
 import java.io.IOException;
 
+/**
+ * @author <a href="http://commons.apache.org/vfs/team-list.html";>Commons VFS 
team</a>
+ */
 class FtpRandomAccessContent extends AbstractRandomAccessStreamContent
 {
-    private final FtpFileObject fileObject;
+    protected long filePointer;
 
-    protected long filePointer = 0;
-    private DataInputStream dis = null;
-    private FtpFileObject.FtpInputStream mis = null;
+    private final FtpFileObject fileObject;
+    private DataInputStream dis;
+    private FtpFileObject.FtpInputStream mis;
 
     FtpRandomAccessContent(final FtpFileObject fileObject, RandomAccessMode 
mode)
     {
@@ -90,22 +93,22 @@
                 return ret;
             }
 
-            public int read(byte b[]) throws IOException
+            public int read(byte[] b) throws IOException
             {
                 int ret = super.read(b);
                 if (ret > -1)
                 {
-                    filePointer+=ret;
+                    filePointer += ret;
                 }
                 return ret;
             }
 
-            public int read(byte b[], int off, int len) throws IOException
+            public int read(byte[] b, int off, int len) throws IOException
             {
                 int ret = super.read(b, off, len);
                 if (ret > -1)
                 {
-                    filePointer+=ret;
+                    filePointer += ret;
                 }
                 return ret;
             }
@@ -138,4 +141,4 @@
     {
         return fileObject.getContent().getSize();
     }
-}
\ No newline at end of file
+}

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileObject.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileObject.java
 Sun Aug 16 08:02:15 2009
@@ -27,7 +27,7 @@
 import java.util.zip.GZIPOutputStream;
 
 /**
- * the gzip file
+ * the gzip file.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileProvider.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileProvider.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileProvider.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileProvider.java
 Sun Aug 16 08:02:15 2009
@@ -29,14 +29,17 @@
 import java.util.Collections;
 
 /**
- * Provides access to the content of gzip compressed files
+ * Provides access to the content of gzip compressed files.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
 public class GzipFileProvider extends CompressedFileFileProvider
 {
-    protected final static Collection capabilities = 
Collections.unmodifiableCollection(Arrays.asList(new Capability[]
+    /**
+     * Capabilities.
+     */
+    protected static final Collection capabilities = 
Collections.unmodifiableCollection(Arrays.asList(new Capability[]
     {
         Capability.GET_LAST_MODIFIED,
         Capability.GET_TYPE,
@@ -52,7 +55,8 @@
         super();
     }
 
-    protected FileSystem createFileSystem(FileName name, FileObject file, 
FileSystemOptions fileSystemOptions) throws FileSystemException
+    protected FileSystem createFileSystem(FileName name, FileObject file, 
FileSystemOptions fileSystemOptions)
+            throws FileSystemException
     {
         return new GzipFileSystem(name, file, fileSystemOptions);
     }

Modified: 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileSystem.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileSystem.java?rev=804644&r1=804643&r2=804644&view=diff
==============================================================================
--- 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileSystem.java
 (original)
+++ 
commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/gzip/GzipFileSystem.java
 Sun Aug 16 08:02:15 2009
@@ -25,14 +25,15 @@
 import java.util.Collection;
 
 /**
- * Filesytem to handle compressed files using the gzip method
+ * Filesytem to handle compressed files using the gzip method.
  *
  * @author <a href="mailto:[email protected]";>Mario Ivankovits</a>
  * @version $Revision$ $Date$
  */
 public class GzipFileSystem extends CompressedFileFileSystem
 {
-    protected GzipFileSystem(FileName rootName, FileObject parentLayer, 
FileSystemOptions fileSystemOptions) throws FileSystemException
+    protected GzipFileSystem(FileName rootName, FileObject parentLayer, 
FileSystemOptions fileSystemOptions)
+            throws FileSystemException
     {
         super(rootName, parentLayer, fileSystemOptions);
     }


Reply via email to