Class FileImpl
- java.lang.Object
 - 
- org.apache.aries.util.filesystem.impl.FileImpl
 
 
- 
- All Implemented Interfaces:
 IFile
- Direct Known Subclasses:
 DirectoryImpl
public class FileImpl extends java.lang.Object implements IFile
An implementation of IFile that represents a java.io.File. 
- 
- 
Constructor Summary
Constructors Constructor Description FileImpl(java.io.File f, java.io.File rootFile) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDirectoryconvert()IDirectoryconvertNested()booleanequals(java.lang.Object obj)longgetLastModified()java.lang.StringgetName()IDirectorygetParent()IDirectorygetRoot()longgetSize()inthashCode()booleanisDirectory()booleanisFile()java.io.InputStreamopen()The input stream returned by this method should always be closed after use.java.lang.StringtoString()java.net.URLtoURL() 
 - 
 
- 
- 
Method Detail
- 
convert
public IDirectory convert()
 
- 
getLastModified
public long getLastModified()
- Specified by:
 getLastModifiedin interfaceIFile- Returns:
 - the last modified date of the file.
 
 
- 
getName
public java.lang.String getName()
 
- 
getParent
public IDirectory getParent()
 
- 
getSize
public long getSize()
 
- 
isDirectory
public boolean isDirectory()
- Specified by:
 isDirectoryin interfaceIFile- Returns:
 - true iff this IFile is also an IDirectory
 
 
- 
isFile
public boolean isFile()
 
- 
open
public java.io.InputStream open() throws java.io.IOExceptionDescription copied from interface:IFileThe input stream returned by this method should always be closed after use. 
- 
getRoot
public IDirectory getRoot()
 
- 
toURL
public java.net.URL toURL() throws java.net.MalformedURLException 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
convertNested
public IDirectory convertNested()
- Specified by:
 convertNestedin interfaceIFile- Returns:
 - if this is a directory or an archive, returns the opened IDirectory
 
 
 - 
 
 -