com.pnp.xfeature.documenttree
Class CachedFile

java.lang.Object
  extended by java.io.File
      extended by com.pnp.xfeature.documenttree.CachedFile
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<java.io.File>

public class CachedFile
extends java.io.File

Class that extends a normal java.io File in order to cache the children files and the parent file.

Author:
Valerio B?rker
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
CachedFile(java.lang.String path)
           
 
Method Summary
 java.io.File getParentFile()
          Caches the parent file when first run.
 boolean isDirectory()
          Caches the directory information when first run.
 java.io.File[] listFiles()
          Caches the children files, when first run.
 void setParent(CachedFile parent)
          Sets the parent file.
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachedFile

public CachedFile(java.lang.String path)
Method Detail

listFiles

public java.io.File[] listFiles()
Caches the children files, when first run.

Overrides:
listFiles in class java.io.File
See Also:
File.listFiles()

getParentFile

public java.io.File getParentFile()
Caches the parent file when first run.

Overrides:
getParentFile in class java.io.File
See Also:
File.getParentFile()

isDirectory

public boolean isDirectory()
Caches the directory information when first run.

Overrides:
isDirectory in class java.io.File
See Also:
File.isDirectory()

setParent

public void setParent(CachedFile parent)
Sets the parent file.

Parameters:
parent - parent file.


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.