You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by rg...@apache.org on 2009/04/13 06:06:06 UTC

svn commit: r764356 [2/11] - in /commons/proper/vfs/trunk: ./ core/src/main/java/org/apache/commons/vfs/ core/src/main/java/org/apache/commons/vfs/auth/ core/src/main/java/org/apache/commons/vfs/cache/ core/src/main/java/org/apache/commons/vfs/events/ ...

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/OnCallRefreshFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/OnCallRefreshFileObject.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/OnCallRefreshFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/OnCallRefreshFileObject.java Mon Apr 13 04:06:01 2009
@@ -34,122 +34,122 @@
  */
 public class OnCallRefreshFileObject extends DecoratedFileObject
 {
-	public OnCallRefreshFileObject(FileObject fileObject)
-	{
-		super(fileObject);		
-	}
-
-	public void close() throws FileSystemException
-	{
-		refresh();
-		super.close();
-	}
-
-	public void copyFrom(FileObject srcFile, FileSelector selector) throws FileSystemException
-	{
-		refresh();
-		super.copyFrom(srcFile, selector);
-	}
-
-	public void createFile() throws FileSystemException
-	{
-		refresh();
-		super.createFile();
-	}
-
-	public void createFolder() throws FileSystemException
-	{
-		refresh();
-		super.createFolder();
-	}
-
-	public boolean delete() throws FileSystemException
-	{
-		refresh();
-		return super.delete();
-	}
-
-	public int delete(FileSelector selector) throws FileSystemException
-	{
-		refresh();
-		return super.delete(selector);
-	}
-
-	public boolean exists() throws FileSystemException
-	{
-		refresh();
-		return super.exists();
-	}
-
-	public void findFiles(FileSelector selector, boolean depthwise, List selected) throws FileSystemException
-	{
-		refresh();
-		super.findFiles(selector, depthwise, selected);
-	}
-
-	public FileObject[] findFiles(FileSelector selector) throws FileSystemException
-	{
-		refresh();
-		return super.findFiles(selector);
-	}
-
-	public FileObject getChild(String name) throws FileSystemException
-	{
-		refresh();
-		return super.getChild(name);
-	}
-
-	public FileObject[] getChildren() throws FileSystemException
-	{
-		refresh();
-		return super.getChildren();
-	}
-
-	public FileContent getContent() throws FileSystemException
-	{
-		refresh();
-		return super.getContent();
-	}
-
-	public FileType getType() throws FileSystemException
-	{
-		refresh();
-		return super.getType();
-	}
-
-	public boolean isHidden() throws FileSystemException
-	{
-		refresh();
-		return super.isHidden();
-	}
-
-	public boolean isReadable() throws FileSystemException
-	{
-		refresh();
-		return super.isReadable();
-	}
-
-	public boolean isWriteable() throws FileSystemException
-	{
-		refresh();
-		return super.isWriteable();
-	}
-
-	public void moveTo(FileObject destFile) throws FileSystemException
-	{
-		refresh();
-		super.moveTo(destFile);
-	}
-
-	public FileObject resolveFile(String name, NameScope scope) throws FileSystemException
-	{
-		refresh();
-		return super.resolveFile(name, scope);
-	}
-
-	public FileObject resolveFile(String path) throws FileSystemException
-	{
-		refresh();
-		return super.resolveFile(path);
-	}
+    public OnCallRefreshFileObject(FileObject fileObject)
+    {
+        super(fileObject);
+    }
+
+    public void close() throws FileSystemException
+    {
+        refresh();
+        super.close();
+    }
+
+    public void copyFrom(FileObject srcFile, FileSelector selector) throws FileSystemException
+    {
+        refresh();
+        super.copyFrom(srcFile, selector);
+    }
+
+    public void createFile() throws FileSystemException
+    {
+        refresh();
+        super.createFile();
+    }
+
+    public void createFolder() throws FileSystemException
+    {
+        refresh();
+        super.createFolder();
+    }
+
+    public boolean delete() throws FileSystemException
+    {
+        refresh();
+        return super.delete();
+    }
+
+    public int delete(FileSelector selector) throws FileSystemException
+    {
+        refresh();
+        return super.delete(selector);
+    }
+
+    public boolean exists() throws FileSystemException
+    {
+        refresh();
+        return super.exists();
+    }
+
+    public void findFiles(FileSelector selector, boolean depthwise, List selected) throws FileSystemException
+    {
+        refresh();
+        super.findFiles(selector, depthwise, selected);
+    }
+
+    public FileObject[] findFiles(FileSelector selector) throws FileSystemException
+    {
+        refresh();
+        return super.findFiles(selector);
+    }
+
+    public FileObject getChild(String name) throws FileSystemException
+    {
+        refresh();
+        return super.getChild(name);
+    }
+
+    public FileObject[] getChildren() throws FileSystemException
+    {
+        refresh();
+        return super.getChildren();
+    }
+
+    public FileContent getContent() throws FileSystemException
+    {
+        refresh();
+        return super.getContent();
+    }
+
+    public FileType getType() throws FileSystemException
+    {
+        refresh();
+        return super.getType();
+    }
+
+    public boolean isHidden() throws FileSystemException
+    {
+        refresh();
+        return super.isHidden();
+    }
+
+    public boolean isReadable() throws FileSystemException
+    {
+        refresh();
+        return super.isReadable();
+    }
+
+    public boolean isWriteable() throws FileSystemException
+    {
+        refresh();
+        return super.isWriteable();
+    }
+
+    public void moveTo(FileObject destFile) throws FileSystemException
+    {
+        refresh();
+        super.moveTo(destFile);
+    }
+
+    public FileObject resolveFile(String name, NameScope scope) throws FileSystemException
+    {
+        refresh();
+        return super.resolveFile(name, scope);
+    }
+
+    public FileObject resolveFile(String path) throws FileSystemException
+    {
+        refresh();
+        return super.resolveFile(path);
+    }
 }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java Mon Apr 13 04:06:01 2009
@@ -44,277 +44,272 @@
  */
 public class SoftRefFilesCache extends AbstractFilesCache
 {
-	/**
-	 * The logger to use.
-	 */
-	private Log log = LogFactory.getLog(SoftRefFilesCache.class);
-
-	private final Map filesystemCache = new HashMap();
-	private final Map refReverseMap = new HashMap(100);
-	private final ReferenceQueue refqueue = new ReferenceQueue();
-
-	private SoftRefReleaseThread softRefReleaseThread = null;
-
-	/**
-	 * This thread will listen on the ReferenceQueue and remove the entry in the
-	 * filescache as soon as the vm removes the reference
-	 */
-	private class SoftRefReleaseThread extends Thread
-	{
-		private boolean requestEnd = false;
-
-		private SoftRefReleaseThread()
-		{
-			setName(SoftRefReleaseThread.class.getName());
-			setDaemon(true);
-		}
-
-		public void run()
-		{
-			loop: while (!requestEnd && !Thread.currentThread().isInterrupted())
-			{
-				try
-				{
-					Reference ref = refqueue.remove(1000);
-					if (ref == null)
-					{
-						continue;
-					}
-
-					FileSystemAndNameKey key;
-					synchronized(refReverseMap)
-					{
-						key = (FileSystemAndNameKey) refReverseMap
-								.get(ref);
-					}
-
-					if (key != null)
-					{
-						if (removeFile(key))
-						{
+    private static final int TIMEOUT = 1000;
+    /**
+     * The logger to use.
+     */
+    private Log log = LogFactory.getLog(SoftRefFilesCache.class);
+
+    private final Map filesystemCache = new HashMap();
+    private final Map refReverseMap = new HashMap(100);
+    private final ReferenceQueue refqueue = new ReferenceQueue();
+
+    private SoftRefReleaseThread softRefReleaseThread;
+
+    /**
+     * This thread will listen on the ReferenceQueue and remove the entry in the
+     * filescache as soon as the vm removes the reference
+     */
+    private final class SoftRefReleaseThread extends Thread
+    {
+        private boolean requestEnd;
+
+        private SoftRefReleaseThread()
+        {
+            setName(SoftRefReleaseThread.class.getName());
+            setDaemon(true);
+        }
+
+        public void run()
+        {
+            loop: while (!requestEnd && !Thread.currentThread().isInterrupted())
+            {
+                try
+                {
+                    Reference ref = refqueue.remove(TIMEOUT);
+                    if (ref == null)
+                    {
+                        continue;
+                    }
+
+                    FileSystemAndNameKey key;
+                    synchronized (refReverseMap)
+                    {
+                        key = (FileSystemAndNameKey) refReverseMap.get(ref);
+                    }
+
+                    if (key != null)
+                    {
+                        if (removeFile(key))
+                        {
                             /* This is not thread safe
                             filesystemClose(key.getFileSystem());
                             */
-						}
-					}
-				}
-				catch (InterruptedException e)
-				{
-					if (!requestEnd)
-					{
-						VfsLog
-								.warn(
-										getLogger(),
-										log,
-										Messages
-												.getString("vfs.impl/SoftRefReleaseThread-interrupt.info"));
-					}
-					break loop;
-				}
-			}
-		}
-	}
-
-	public SoftRefFilesCache()
-	{
-	}
-
-	private void startThread()
-	{
-		if (softRefReleaseThread != null)
-		{
-			throw new IllegalStateException(
-					Messages
-							.getString("vfs.impl/SoftRefReleaseThread-already-running.warn"));
-		}
-
-		softRefReleaseThread = new SoftRefReleaseThread();
-		softRefReleaseThread.start();
-	}
-
-	private void endThread()
-	{
-		if (softRefReleaseThread != null)
-		{
-			softRefReleaseThread.requestEnd = true;
-			softRefReleaseThread.interrupt();
-			softRefReleaseThread = null;
-		}
-	}
-
-	public void putFile(final FileObject file)
-	{
-		if (log.isDebugEnabled())
-		{
-			log.debug("putFile: " + file.getName());
-		}
-
-		Map files = getOrCreateFilesystemCache(file.getFileSystem());
-
-		Reference ref = createReference(file, refqueue);
-		FileSystemAndNameKey key = new FileSystemAndNameKey(file
-				.getFileSystem(), file.getName());
-
-		synchronized (files)
-		{
-			Reference old = (Reference)files.put(file.getName(), ref);
-			synchronized(refReverseMap)
-			{
+                        }
+                    }
+                }
+                catch (InterruptedException e)
+                {
+                    if (!requestEnd)
+                    {
+                        VfsLog.warn(getLogger(), log,
+                                    Messages.getString("vfs.impl/SoftRefReleaseThread-interrupt.info"));
+                    }
+                    break loop;
+                }
+            }
+        }
+    }
+
+    public SoftRefFilesCache()
+    {
+    }
+
+    private void startThread()
+    {
+        if (softRefReleaseThread != null)
+        {
+            throw new IllegalStateException(
+                    Messages.getString("vfs.impl/SoftRefReleaseThread-already-running.warn"));
+        }
+
+        softRefReleaseThread = new SoftRefReleaseThread();
+        softRefReleaseThread.start();
+    }
+
+    private void endThread()
+    {
+        if (softRefReleaseThread != null)
+        {
+            softRefReleaseThread.requestEnd = true;
+            softRefReleaseThread.interrupt();
+            softRefReleaseThread = null;
+        }
+    }
+
+    public void putFile(final FileObject file)
+    {
+        if (log.isDebugEnabled())
+        {
+            log.debug("putFile: " + file.getName());
+        }
+
+        Map files = getOrCreateFilesystemCache(file.getFileSystem());
+
+        Reference ref = createReference(file, refqueue);
+        FileSystemAndNameKey key = new FileSystemAndNameKey(file
+                .getFileSystem(), file.getName());
+
+        synchronized (files)
+        {
+            Reference old = (Reference) files.put(file.getName(), ref);
+            synchronized (refReverseMap)
+            {
                 if (old != null)
                 {
                     refReverseMap.remove(old);
                 }
                 refReverseMap.put(ref, key);
-			}
-		}
-	}
-
-	protected Reference createReference(FileObject file, ReferenceQueue refqueue)
-	{
-		return new SoftReference(file, refqueue);
-	}
-
-	public FileObject getFile(final FileSystem filesystem, final FileName name)
-	{
-		Map files = getOrCreateFilesystemCache(filesystem);
-
-		synchronized (files)
-		{
-			Reference ref = (Reference) files.get(name);
-			if (ref == null)
-			{
-				return null;
-			}
-
-			FileObject fo = (FileObject) ref.get();
-			if (fo == null)
-			{
-				removeFile(filesystem, name);
-			}
-			return fo;
-		}
-	}
-
-	public void clear(FileSystem filesystem)
-	{
-		Map files = getOrCreateFilesystemCache(filesystem);
-
-		boolean closeFilesystem;
-
-		synchronized (files)
-		{
-			synchronized(refReverseMap)
-			{
-				Iterator iterKeys = refReverseMap.values().iterator();
-				while (iterKeys.hasNext())
-				{
-					FileSystemAndNameKey key = (FileSystemAndNameKey) iterKeys.next();
-					if (key.getFileSystem() == filesystem)
-					{
-						iterKeys.remove();
-						files.remove(key.getFileName());
-					}
-				}
-
-				closeFilesystem = files.size() < 1;
-			}
-		}
-
-		if (closeFilesystem)
-		{
-			filesystemClose(filesystem);
-		}
-	}
-
-	private void filesystemClose(FileSystem filesystem)
-	{
-		if (log.isDebugEnabled())
-		{
-			log.debug("close fs: " + filesystem.getRootName());
-		}
-		synchronized (filesystemCache)
-		{
-			filesystemCache.remove(filesystem);
-			if (filesystemCache.size() < 1)
-			{
-				endThread();
-			}
-		}
-		((DefaultFileSystemManager) getContext().getFileSystemManager())
-				._closeFileSystem(filesystem);
-	}
-
-	public void close()
-	{
-		super.close();
-
-		endThread();
-
-		// files.clear();
-		synchronized (filesystemCache)
-		{
-			filesystemCache.clear();
-		}
-
-		synchronized(refReverseMap)
-		{
-			refReverseMap.clear();
-		}
-	}
-
-	public void removeFile(FileSystem filesystem, FileName name)
-	{
-		if (removeFile(new FileSystemAndNameKey(filesystem, name)))
-		{
-			filesystemClose(filesystem);
-		}
-	}
-
-	public void touchFile(FileObject file)
-	{
-	}
-
-	private boolean removeFile(final FileSystemAndNameKey key)
-	{
-		if (log.isDebugEnabled())
-		{
-			log.debug("removeFile: " + key.getFileName());
-		}
-
-		Map files = getOrCreateFilesystemCache(key.getFileSystem());
-
-		synchronized (files)
-		{
-			Object ref = files.remove(key.getFileName());
-			if (ref != null)
-			{
-				synchronized(refReverseMap)
-				{
-					refReverseMap.remove(ref);
-				}
-			}
-
-			return files.size() < 1;
-		}
-	}
-
-	protected Map getOrCreateFilesystemCache(final FileSystem filesystem)
-	{
-		synchronized (filesystemCache)
-		{
-			if (filesystemCache.size() < 1)
-			{
-				startThread();
-			}
-
-			Map files = (Map) filesystemCache.get(filesystem);
-			if (files == null)
-			{
-				files = new HashMap();
-				filesystemCache.put(filesystem, files);
-			}
-
-			return files;
-		}
-	}
+            }
+        }
+    }
+
+    protected Reference createReference(FileObject file, ReferenceQueue refqueue)
+    {
+        return new SoftReference(file, refqueue);
+    }
+
+    public FileObject getFile(final FileSystem filesystem, final FileName name)
+    {
+        Map files = getOrCreateFilesystemCache(filesystem);
+
+        synchronized (files)
+        {
+            Reference ref = (Reference) files.get(name);
+            if (ref == null)
+            {
+                return null;
+            }
+
+            FileObject fo = (FileObject) ref.get();
+            if (fo == null)
+            {
+                removeFile(filesystem, name);
+            }
+            return fo;
+        }
+    }
+
+    public void clear(FileSystem filesystem)
+    {
+        Map files = getOrCreateFilesystemCache(filesystem);
+
+        boolean closeFilesystem;
+
+        synchronized (files)
+        {
+            synchronized (refReverseMap)
+            {
+                Iterator iterKeys = refReverseMap.values().iterator();
+                while (iterKeys.hasNext())
+                {
+                    FileSystemAndNameKey key = (FileSystemAndNameKey) iterKeys.next();
+                    if (key.getFileSystem() == filesystem)
+                    {
+                        iterKeys.remove();
+                        files.remove(key.getFileName());
+                    }
+                }
+
+                closeFilesystem = files.size() < 1;
+            }
+        }
+
+        if (closeFilesystem)
+        {
+            filesystemClose(filesystem);
+        }
+    }
+
+    private void filesystemClose(FileSystem filesystem)
+    {
+        if (log.isDebugEnabled())
+        {
+            log.debug("close fs: " + filesystem.getRootName());
+        }
+        synchronized (filesystemCache)
+        {
+            filesystemCache.remove(filesystem);
+            if (filesystemCache.size() < 1)
+            {
+                endThread();
+            }
+        }
+        ((DefaultFileSystemManager) getContext().getFileSystemManager())
+                ._closeFileSystem(filesystem);
+    }
+
+    public void close()
+    {
+        super.close();
+
+        endThread();
+
+        // files.clear();
+        synchronized (filesystemCache)
+        {
+            filesystemCache.clear();
+        }
+
+        synchronized (refReverseMap)
+        {
+            refReverseMap.clear();
+        }
+    }
+
+    public void removeFile(FileSystem filesystem, FileName name)
+    {
+        if (removeFile(new FileSystemAndNameKey(filesystem, name)))
+        {
+            filesystemClose(filesystem);
+        }
+    }
+
+    public void touchFile(FileObject file)
+    {
+    }
+
+    private boolean removeFile(final FileSystemAndNameKey key)
+    {
+        if (log.isDebugEnabled())
+        {
+            log.debug("removeFile: " + key.getFileName());
+        }
+
+        Map files = getOrCreateFilesystemCache(key.getFileSystem());
+
+        synchronized (files)
+        {
+            Object ref = files.remove(key.getFileName());
+            if (ref != null)
+            {
+                synchronized (refReverseMap)
+                {
+                    refReverseMap.remove(ref);
+                }
+            }
+
+            return files.size() < 1;
+        }
+    }
+
+    protected Map getOrCreateFilesystemCache(final FileSystem filesystem)
+    {
+        synchronized (filesystemCache)
+        {
+            if (filesystemCache.size() < 1)
+            {
+                startThread();
+            }
+
+            Map files = (Map) filesystemCache.get(filesystem);
+            if (files == null)
+            {
+                files = new HashMap();
+                filesystemCache.put(filesystem, files);
+            }
+
+            return files;
+        }
+    }
 }

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/WeakRefFilesCache.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/WeakRefFilesCache.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/WeakRefFilesCache.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/WeakRefFilesCache.java Mon Apr 13 04:06:01 2009
@@ -27,7 +27,7 @@
  * the java vm. As soon as the object is no longer reachable it will be discarded.
  * In contrast to the SoftRefFilesCache this implementation might free resources faster
  * as it don't wait until a memory limitation.
- * 
+ *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  * @version $Revision$ $Date: 2005-09-30 09:02:41 +0200 (Fr, 30 Sep
  *          2005) $
@@ -35,8 +35,8 @@
  */
 public class WeakRefFilesCache extends SoftRefFilesCache
 {
-	protected Reference createReference(FileObject file, ReferenceQueue refqueue)
-	{
-		return new WeakReference(file, refqueue);
-	}
+    protected Reference createReference(FileObject file, ReferenceQueue refqueue)
+    {
+        return new WeakReference(file, refqueue);
+    }
 }

Added: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html?rev=764356&view=auto
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html (added)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html Mon Apr 13 04:06:01 2009
@@ -0,0 +1,19 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<body>
+<p>VFS File caching</p>
+</body>

Propchange: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/package.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/AbstractFileChangeEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/AbstractFileChangeEvent.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/AbstractFileChangeEvent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/AbstractFileChangeEvent.java Mon Apr 13 04:06:01 2009
@@ -22,6 +22,7 @@
 
 /**
  * A change event that knows how to notify a listener.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public abstract class AbstractFileChangeEvent extends FileChangeEvent
 {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/ChangedEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/ChangedEvent.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/ChangedEvent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/ChangedEvent.java Mon Apr 13 04:06:01 2009
@@ -21,6 +21,7 @@
 
 /**
  * File changed event.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class ChangedEvent extends AbstractFileChangeEvent
 {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/CreateEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/CreateEvent.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/CreateEvent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/CreateEvent.java Mon Apr 13 04:06:01 2009
@@ -21,6 +21,7 @@
 
 /**
  * File creation event.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class CreateEvent extends AbstractFileChangeEvent
 {

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/DeleteEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/DeleteEvent.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/DeleteEvent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/DeleteEvent.java Mon Apr 13 04:06:01 2009
@@ -21,6 +21,7 @@
 
 /**
  * File deletion event.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class DeleteEvent extends AbstractFileChangeEvent
 {

Added: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html?rev=764356&view=auto
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html (added)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html Mon Apr 13 04:06:01 2009
@@ -0,0 +1,19 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<body>
+<p>VFS Events</p>
+</body>

Propchange: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/events/package.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DecoratedFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DecoratedFileObject.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DecoratedFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DecoratedFileObject.java Mon Apr 13 04:06:01 2009
@@ -37,161 +37,161 @@
  */
 public class DecoratedFileObject implements FileObject
 {
-	final FileObject decoratedFileObject;
+    private final FileObject decoratedFileObject;
 
-	public DecoratedFileObject(FileObject decoratedFileObject)
-	{
-		super();
-		this.decoratedFileObject = decoratedFileObject;
-	}
-
-	public boolean canRenameTo(FileObject newfile)
-	{
-		return decoratedFileObject.canRenameTo(newfile);
-	}
-
-	public void close() throws FileSystemException
-	{
-		decoratedFileObject.close();
-	}
-
-	public void copyFrom(FileObject srcFile, FileSelector selector) throws FileSystemException
-	{
-		decoratedFileObject.copyFrom(srcFile, selector);
-	}
-
-	public void createFile() throws FileSystemException
-	{
-		decoratedFileObject.createFile();
-	}
-
-	public void createFolder() throws FileSystemException
-	{
-		decoratedFileObject.createFolder();
-	}
-
-	public boolean delete() throws FileSystemException
-	{
-		return decoratedFileObject.delete();
-	}
-
-	public int delete(FileSelector selector) throws FileSystemException
-	{
-		return decoratedFileObject.delete(selector);
-	}
-
-	public boolean exists() throws FileSystemException
-	{
-		return decoratedFileObject.exists();
-	}
-
-	public void findFiles(FileSelector selector, boolean depthwise, List selected) throws FileSystemException
-	{
-		decoratedFileObject.findFiles(selector, depthwise, selected);
-	}
-
-	public FileObject[] findFiles(FileSelector selector) throws FileSystemException
-	{
-		return decoratedFileObject.findFiles(selector);
-	}
-
-	public FileObject getChild(String name) throws FileSystemException
-	{
-		return decoratedFileObject.getChild(name);
-	}
-
-	public FileObject[] getChildren() throws FileSystemException
-	{
-		return decoratedFileObject.getChildren();
-	}
-
-	public FileContent getContent() throws FileSystemException
-	{
-		return decoratedFileObject.getContent();
-	}
-
-	public FileSystem getFileSystem()
-	{
-		return decoratedFileObject.getFileSystem();
-	}
-
-	public FileName getName()
-	{
-		return decoratedFileObject.getName();
-	}
-
-	public FileObject getParent() throws FileSystemException
-	{
-		return decoratedFileObject.getParent();
-	}
-
-	public FileType getType() throws FileSystemException
-	{
-		return decoratedFileObject.getType();
-	}
-
-	public URL getURL() throws FileSystemException
-	{
-		return decoratedFileObject.getURL();
-	}
-
-	public boolean isHidden() throws FileSystemException
-	{
-		return decoratedFileObject.isHidden();
-	}
-
-	public boolean isReadable() throws FileSystemException
-	{
-		return decoratedFileObject.isReadable();
-	}
-
-	public boolean isWriteable() throws FileSystemException
-	{
-		return decoratedFileObject.isWriteable();
-	}
-
-	public void moveTo(FileObject destFile) throws FileSystemException
-	{
-		decoratedFileObject.moveTo(destFile);
-	}
-
-	public FileObject resolveFile(String name, NameScope scope) throws FileSystemException
-	{
-		return decoratedFileObject.resolveFile(name, scope);
-	}
-
-	public FileObject resolveFile(String path) throws FileSystemException
-	{
-		return decoratedFileObject.resolveFile(path);
-	}
-
-	public void refresh() throws FileSystemException
-	{
-		decoratedFileObject.refresh();
-	}
-
-	public FileObject getDecoratedFileObject()
-	{
-		return decoratedFileObject;
-	}
-
-	public boolean isAttached()
-	{
-		return decoratedFileObject.isAttached();
-	}
-
-	public boolean isContentOpen()
-	{
-		return decoratedFileObject.isContentOpen();
-	}
-
-	public String toString()
-	{
-		return decoratedFileObject.toString();
-	}
-
-	public FileOperations getFileOperations() throws FileSystemException
-	{
-		return decoratedFileObject.getFileOperations();
-	}
-}
\ No newline at end of file
+    public DecoratedFileObject(FileObject decoratedFileObject)
+    {
+        super();
+        this.decoratedFileObject = decoratedFileObject;
+    }
+
+    public boolean canRenameTo(FileObject newfile)
+    {
+        return decoratedFileObject.canRenameTo(newfile);
+    }
+
+    public void close() throws FileSystemException
+    {
+        decoratedFileObject.close();
+    }
+
+    public void copyFrom(FileObject srcFile, FileSelector selector) throws FileSystemException
+    {
+        decoratedFileObject.copyFrom(srcFile, selector);
+    }
+
+    public void createFile() throws FileSystemException
+    {
+        decoratedFileObject.createFile();
+    }
+
+    public void createFolder() throws FileSystemException
+    {
+        decoratedFileObject.createFolder();
+    }
+
+    public boolean delete() throws FileSystemException
+    {
+        return decoratedFileObject.delete();
+    }
+
+    public int delete(FileSelector selector) throws FileSystemException
+    {
+        return decoratedFileObject.delete(selector);
+    }
+
+    public boolean exists() throws FileSystemException
+    {
+        return decoratedFileObject.exists();
+    }
+
+    public void findFiles(FileSelector selector, boolean depthwise, List selected) throws FileSystemException
+    {
+        decoratedFileObject.findFiles(selector, depthwise, selected);
+    }
+
+    public FileObject[] findFiles(FileSelector selector) throws FileSystemException
+    {
+        return decoratedFileObject.findFiles(selector);
+    }
+
+    public FileObject getChild(String name) throws FileSystemException
+    {
+        return decoratedFileObject.getChild(name);
+    }
+
+    public FileObject[] getChildren() throws FileSystemException
+    {
+        return decoratedFileObject.getChildren();
+    }
+
+    public FileContent getContent() throws FileSystemException
+    {
+        return decoratedFileObject.getContent();
+    }
+
+    public FileSystem getFileSystem()
+    {
+        return decoratedFileObject.getFileSystem();
+    }
+
+    public FileName getName()
+    {
+        return decoratedFileObject.getName();
+    }
+
+    public FileObject getParent() throws FileSystemException
+    {
+        return decoratedFileObject.getParent();
+    }
+
+    public FileType getType() throws FileSystemException
+    {
+        return decoratedFileObject.getType();
+    }
+
+    public URL getURL() throws FileSystemException
+    {
+        return decoratedFileObject.getURL();
+    }
+
+    public boolean isHidden() throws FileSystemException
+    {
+        return decoratedFileObject.isHidden();
+    }
+
+    public boolean isReadable() throws FileSystemException
+    {
+        return decoratedFileObject.isReadable();
+    }
+
+    public boolean isWriteable() throws FileSystemException
+    {
+        return decoratedFileObject.isWriteable();
+    }
+
+    public void moveTo(FileObject destFile) throws FileSystemException
+    {
+        decoratedFileObject.moveTo(destFile);
+    }
+
+    public FileObject resolveFile(String name, NameScope scope) throws FileSystemException
+    {
+        return decoratedFileObject.resolveFile(name, scope);
+    }
+
+    public FileObject resolveFile(String path) throws FileSystemException
+    {
+        return decoratedFileObject.resolveFile(path);
+    }
+
+    public void refresh() throws FileSystemException
+    {
+        decoratedFileObject.refresh();
+    }
+
+    public FileObject getDecoratedFileObject()
+    {
+        return decoratedFileObject;
+    }
+
+    public boolean isAttached()
+    {
+        return decoratedFileObject.isAttached();
+    }
+
+    public boolean isContentOpen()
+    {
+        return decoratedFileObject.isContentOpen();
+    }
+
+    public String toString()
+    {
+        return decoratedFileObject.toString();
+    }
+
+    public FileOperations getFileOperations() throws FileSystemException
+    {
+        return decoratedFileObject.getFileOperations();
+    }
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileContentInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileContentInfo.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileContentInfo.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileContentInfo.java Mon Apr 13 04:06:01 2009
@@ -18,6 +18,10 @@
 
 import org.apache.commons.vfs.FileContentInfo;
 
+/**
+ * The default file content information.
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
+ */
 public class DefaultFileContentInfo implements FileContentInfo
 {
     private final String contentType;
@@ -38,4 +42,4 @@
     {
         return contentEncoding;
     }
-}
\ No newline at end of file
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java Mon Apr 13 04:06:01 2009
@@ -83,7 +83,11 @@
  */
 public class DefaultFileMonitor implements Runnable, FileMonitor
 {
-    private final static Log log = LogFactory.getLog(DefaultFileMonitor.class);
+    private static final Log LOG = LogFactory.getLog(DefaultFileMonitor.class);
+
+    private static final long DEFAULT_DELAY = 1000;
+
+    private static final int DEFAULT_MAX_FILES = 1000;
 
     /**
      * Map from FileName to FileObject being monitored.
@@ -113,17 +117,17 @@
     /**
      * A flag used to determine if adding files to be monitored should be recursive.
      */
-    private boolean recursive = false;
+    private boolean recursive;
 
     /**
      * Set the delay between checks
      */
-    private long delay = 1000;
+    private long delay = DEFAULT_DELAY;
 
     /**
      * Set the number of files to check until a delay will be inserted
      */
-    private int checksPerRun = 1000;
+    private int checksPerRun = DEFAULT_MAX_FILES;
 
     /**
      * A listener object that if set, is notified on file creation and deletion.
@@ -137,6 +141,7 @@
 
     /**
      * Access method to get the recursive setting when adding files for monitoring.
+     * @return true if monitoring is enabled for children.
      */
     public boolean isRecursive()
     {
@@ -145,6 +150,7 @@
 
     /**
      * Access method to set the recursive setting when adding files for monitoring.
+     * @param newRecursive true if monitoring should be enabled for children.
      */
     public void setRecursive(final boolean newRecursive)
     {
@@ -154,6 +160,7 @@
     /**
      * Access method to get the current FileListener object notified when there
      * are changes with the files added.
+     * @return The FileListener.
      */
     FileListener getFileListener()
     {
@@ -162,10 +169,11 @@
 
     /**
      * Adds a file to be monitored.
+     * @param file The FileObject to monitor.
      */
     public void addFile(final FileObject file)
     {
-        _addFile(file);
+        doAddFile(file);
         try
         {
             // add all direct children too
@@ -175,20 +183,21 @@
                 final FileObject[] children = file.getChildren();
                 for (int i = 0; i < children.length; i++)
                 {
-                    _addFile(children[i]);
+                    doAddFile(children[i]);
                 }
             }
         }
         catch (FileSystemException fse)
         {
-            log.error(fse.getLocalizedMessage(), fse);
+            LOG.error(fse.getLocalizedMessage(), fse);
         }
     }
 
     /**
      * Adds a file to be monitored.
+     * @param file The FileObject to add.
      */
-    private void _addFile(final FileObject file)
+    private void doAddFile(final FileObject file)
     {
         synchronized (this.monitorMap)
         {
@@ -217,7 +226,7 @@
                 }
                 catch (FileSystemException fse)
                 {
-                    log.error(fse.getLocalizedMessage(), fse);
+                    LOG.error(fse.getLocalizedMessage(), fse);
                 }
 
             }
@@ -226,6 +235,7 @@
 
     /**
      * Removes a file from being monitored.
+     * @param file The FileObject to remove from monitoring.
      */
     public void removeFile(final FileObject file)
     {
@@ -261,6 +271,7 @@
 
     /**
      * Queues a file for removal from being monitored.
+     * @param file The FileObject to be removed from being monitored.
      */
     protected void queueRemoveFile(final FileObject file)
     {
@@ -269,6 +280,7 @@
 
     /**
      * Get the delay between runs
+     * @return The delay period.
      */
     public long getDelay()
     {
@@ -277,6 +289,7 @@
 
     /**
      * Set the delay between runs
+     * @param delay The delay period.
      */
     public void setDelay(long delay)
     {
@@ -286,12 +299,13 @@
         }
         else
         {
-            this.delay = 1000;
+            this.delay = DEFAULT_DELAY;
         }
     }
 
     /**
      * get the number of files to check per run
+     * @return The number of files to check per iteration.
      */
     public int getChecksPerRun()
     {
@@ -311,6 +325,7 @@
 
     /**
      * Queues a file for addition to be monitored.
+     * @param file The FileObject to add.
      */
     protected void queueAddFile(final FileObject file)
     {
@@ -353,7 +368,7 @@
             }
 
             // For each entry in the map
-            Object fileNames[];
+            Object[] fileNames;
             synchronized (this.monitorMap)
             {
                 fileNames = this.monitorMap.keySet().toArray();
@@ -382,7 +397,7 @@
                         }
                         catch (InterruptedException e)
                         {
-
+                            // Woke up.
                         }
                     }
                 }
@@ -414,14 +429,14 @@
     /**
      * File monitor agent.
      */
-    private static class FileMonitorAgent
+    private static final class FileMonitorAgent
     {
         private final FileObject file;
         private final DefaultFileMonitor fm;
 
         private boolean exists;
         private long timestamp;
-        private Map children = null;
+        private Map children;
 
         private FileMonitorAgent(DefaultFileMonitor fm, FileObject file)
         {
@@ -480,11 +495,11 @@
         {
             try
             {
-				this.file.refresh();
-			}
+                this.file.refresh();
+            }
             catch (FileSystemException fse)
             {
-                log.error(fse.getLocalizedMessage(), fse);
+                LOG.error(fse.getLocalizedMessage(), fse);
             }
         }
 
@@ -493,6 +508,7 @@
          * Recursively fires create events for all children if recursive descent is
          * enabled. Otherwise the create event is only fired for the initial
          * FileObject.
+         * @param child The child to add.
          */
         private void fireAllCreate(FileObject child)
         {
@@ -531,7 +547,7 @@
             }
             catch (FileSystemException fse)
             {
-                log.error(fse.getLocalizedMessage(), fse);
+                LOG.error(fse.getLocalizedMessage(), fse);
             }
         }
 
@@ -597,7 +613,7 @@
             }
             catch (FileSystemException fse)
             {
-                log.error(fse.getLocalizedMessage(), fse);
+                LOG.error(fse.getLocalizedMessage(), fse);
             }
         }
 
@@ -632,11 +648,9 @@
                 {
 
                     // Check the timestamp to see if it has been modified
-                    if (this.timestamp !=
-                        this.file.getContent().getLastModifiedTime())
+                    if (this.timestamp != this.file.getContent().getLastModifiedTime())
                     {
-                        this.timestamp =
-                            this.file.getContent().getLastModifiedTime();
+                        this.timestamp = this.file.getContent().getLastModifiedTime();
                         // Fire change event
 
                         // Don't fire if it's a folder because new file children
@@ -667,10 +681,9 @@
             }
             catch (FileSystemException fse)
             {
-                log.error(fse.getLocalizedMessage(), fse);
+                LOG.error(fse.getLocalizedMessage(), fse);
             }
         }
 
     }
-
-}
\ No newline at end of file
+}

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileReplicator.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileReplicator.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileReplicator.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileReplicator.java Mon Apr 13 04:06:01 2009
@@ -43,22 +43,23 @@
     extends AbstractVfsComponent
     implements FileReplicator, TemporaryFileStore
 {
-    private final static Log log = LogFactory.getLog(DefaultFileReplicator.class);
+    private static final char[] TMP_RESERVED_CHARS = new char[]
+        {
+            '?', '/', '\\', ' ', '&', '"', '\'', '*', '#', ';', ':', '<', '>', '|'
+        };
+    private static Log log = LogFactory.getLog(DefaultFileReplicator.class);
+
+    private static final int MASK = 0xffff;
 
     private final ArrayList copies = new ArrayList();
     private File tempDir;
     private long filecount;
     private boolean tempDirMessageLogged;
 
-    private char[] TMP_RESERVED_CHARS = new char[]
-        {
-            '?', '/', '\\', ' ', '&', '"', '\'', '*', '#', ';', ':', '<', '>', '|'
-        };
-
     /**
      * constructor to set the location of the temporary directory
      *
-     * @param tempDir
+     * @param tempDir The temporary directory.
      */
     public DefaultFileReplicator(final File tempDir)
     {
@@ -71,6 +72,7 @@
 
     /**
      * Initialises this component.
+     * @throws FileSystemException if an error occurs.
      */
     public void init() throws FileSystemException
     {
@@ -81,7 +83,7 @@
             tempDir = new File(baseTmpDir, "vfs_cache").getAbsoluteFile();
         }
 
-        filecount = new Random().nextInt() & 0xffff;
+        filecount = new Random().nextInt() & MASK;
 
         if (!tempDirMessageLogged)
         {
@@ -117,6 +119,7 @@
 
     /**
      * physically deletes the file from the filesystem
+     * @param file The File to delete.
      */
     protected void deleteFile(File file)
     {
@@ -135,6 +138,7 @@
     /**
      * removes a file from the copies list. Will be used for cleanup. <br/>
      * Notice: The system awaits that the returning object can be cast to a java.io.File
+     * @return the File that was removed.
      */
     protected Object removeFile()
     {
@@ -146,6 +150,7 @@
 
     /**
      * removes a instance from the list of copies
+     * @param file The File to remove.
      */
     protected void removeFile(Object file)
     {
@@ -157,6 +162,9 @@
 
     /**
      * Allocates a new temporary file.
+     * @param baseName the base file name.
+     * @return The created File.
+     * @throws FileSystemException if an error occurs.
      */
     public File allocateFile(final String baseName) throws FileSystemException
     {
@@ -167,9 +175,7 @@
             filecount++;
         }
 
-        final File file = createAndAddFile(tempDir, basename);
-
-        return file;
+        return createAndAddFile(tempDir, basename);
     }
 
     protected File createAndAddFile(final File parent, final String basename) throws FileSystemException
@@ -197,6 +203,8 @@
 
     /**
      * create the temporary file name
+     * @param baseName The base to prepend to the file name being created.
+     * @return the name of the File.
      */
     protected String createFilename(final String baseName)
     {
@@ -211,6 +219,10 @@
 
     /**
      * create the temporary file
+     * @param parent The file to use as the parent of the file being created.
+     * @param name The name of the file to create.
+     * @return The File that was created.
+     * @throws FileSystemException if an error occurs creating the file.
      */
     protected File createFile(final File parent, final String name) throws FileSystemException
     {
@@ -219,6 +231,10 @@
 
     /**
      * Creates a local copy of the file, and all its descendents.
+     * @param srcFile The file to copy.
+     * @param selector The FileSelector.
+     * @return the created File.
+     * @throws FileSystemException if an error occurs copying the file.
      */
     public File replicateFile(final FileObject srcFile,
                               final FileSelector selector)

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java?rev=764356&r1=764355&r2=764356&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemConfigBuilder.java Mon Apr 13 04:06:01 2009
@@ -23,34 +23,42 @@
 
 /**
  * Default options usable for all filesystems
+ * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
  */
 public class DefaultFileSystemConfigBuilder extends FileSystemConfigBuilder
 {
-	private final static DefaultFileSystemConfigBuilder builder = new DefaultFileSystemConfigBuilder();
+    /** The default FileSystemConfigBuilder */
+    private static final DefaultFileSystemConfigBuilder BUILDER = new DefaultFileSystemConfigBuilder();
 
-	public static DefaultFileSystemConfigBuilder getInstance()
-	{
-		return builder;
-	}
+    public static DefaultFileSystemConfigBuilder getInstance()
+    {
+        return BUILDER;
+    }
 
-	/**
-	 * Sets the user authenticator to get authentication informations
-	 */
-	public void setUserAuthenticator(FileSystemOptions opts, UserAuthenticator userAuthenticator) throws FileSystemException
-	{
-		setParam(opts, "userAuthenticator", userAuthenticator);
-	}
+    /**
+     * Sets the user authenticator to get authentication informations
+     * @param opts The FileSystemOptions.
+     * @param userAuthenticator The UserAuthenticator.
+     * @throws FileSystemException if an error occurs setting the UserAuthenticator.
+     */
+    public void setUserAuthenticator(FileSystemOptions opts, UserAuthenticator userAuthenticator)
+            throws FileSystemException
+    {
+        setParam(opts, "userAuthenticator", userAuthenticator);
+    }
 
-	/**
-	 * @see #setUserAuthenticator
-	 */
-	public UserAuthenticator getUserAuthenticator(FileSystemOptions opts)
-	{
-		return (UserAuthenticator) getParam(opts, "userAuthenticator");
-	}
+    /**
+     * @see #setUserAuthenticator
+     * @param opts The FileSystemOptions.
+     * @return The UserAuthenticator.
+     */
+    public UserAuthenticator getUserAuthenticator(FileSystemOptions opts)
+    {
+        return (UserAuthenticator) getParam(opts, "userAuthenticator");
+    }
 
-	protected Class getConfigClass()
-	{
-		return DefaultFileSystemConfigBuilder.class;
-	}
+    protected Class getConfigClass()
+    {
+        return DefaultFileSystemConfigBuilder.class;
+    }
 }