You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2007/05/14 20:41:52 UTC
svn commit: r537944 -
/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
Author: imario
Date: Mon May 14 11:41:51 2007
New Revision: 537944
URL: http://svn.apache.org/viewvc?view=rev&rev=537944
Log:
VFS-150: Added doCreateFileContent to allow creating your own FileContent implementation - Thanks to Adam Heath for the patch!
Modified:
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
Modified: jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java?view=diff&rev=537944&r1=537943&r2=537944
==============================================================================
--- jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java (original)
+++ jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java Mon May 14 11:41:51 2007
@@ -68,7 +68,7 @@
private final AbstractFileName name;
private final AbstractFileSystem fs;
- private DefaultFileContent content;
+ private FileContent content;
// Cached info
private boolean attached;
@@ -1072,13 +1072,21 @@
attach();
if (content == null)
{
- content = new DefaultFileContent(this, getFileContentInfoFactory());
+ content = doCreateFileContent();
}
return content;
}
}
- /**
+ /**
+ * Create a FileContent implementation
+ */
+ protected FileContent doCreateFileContent() throws FileSystemException
+ {
+ return new DefaultFileContent(this, getFileContentInfoFactory());
+ }
+
+ /**
* This will prepare the fileObject to get resynchronized with the underlaying filesystem if required
*/
public void refresh() throws FileSystemException
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org