org.apache.aries.application.utils.filesystem.impl
Class FileImpl
java.lang.Object
org.apache.aries.application.utils.filesystem.impl.FileImpl
- All Implemented Interfaces:
- IFile
- Direct Known Subclasses:
- DirectoryImpl
public class FileImpl
- extends Object
- implements IFile
An implementation of IFile that represents a java.io.File.
|
Field Summary |
protected File |
file
This file in the file system |
protected String |
rootDir
The name of the root directory of the file system |
protected File |
rootDirFile
The root File in the file system |
rootDir
protected String rootDir
- The name of the root directory of the file system
file
protected File file
- This file in the file system
rootDirFile
protected File rootDirFile
- The root File in the file system
FileImpl
public FileImpl(File f,
File rootFile)
- Parameters:
f - this file.rootFile - the root of the vFS.
convert
public IDirectory convert()
- Specified by:
convert in interface IFile
getLastModified
public long getLastModified()
- Specified by:
getLastModified in interface IFile
getName
public String getName()
- Specified by:
getName in interface IFile
getParent
public IDirectory getParent()
- Specified by:
getParent in interface IFile
getSize
public long getSize()
- Specified by:
getSize in interface IFile
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory in interface IFile
isFile
public boolean isFile()
- Specified by:
isFile in interface IFile
open
public InputStream open()
throws IOException
- Specified by:
open in interface IFile
- Throws:
IOException
getRoot
public IDirectory getRoot()
- Specified by:
getRoot in interface IFile
toURL
public URL toURL()
throws MalformedURLException
- Specified by:
toURL in interface IFile
- Throws:
MalformedURLException
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.