|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
javafe.genericfile.NormalGenericFile
A NormalGenericFile represents a normal file (File
)
as a GenericFile.
Field Summary | |
private static long |
serialVersionUID
|
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
NormalGenericFile(java.io.File underlyingFile)
Create a NormalGenericFile to represent an existing File . |
|
NormalGenericFile(java.lang.String name)
Create a NormalGenericFile from a filename. |
Method Summary | |
java.lang.String |
getCanonicalID()
Return a String that canonically represents the identity of our underlying file. |
java.lang.String |
getHumanName()
Return a name that uniquely identifies us to the user. |
java.io.InputStream |
getInputStream()
Open the file we represent as an InputStream . |
java.lang.String |
getLocalName()
Return our local name, the name that distinguishes us within the directory that contains us. |
GenericFile |
getSibling(java.lang.String n)
Attempt to return a GenericFile that describes the file in the same "directory" as us that has the local name n . |
Methods inherited from class java.io.File |
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javafe.genericfile.GenericFile |
isDirectory, lastModified |
Field Detail |
private static final long serialVersionUID
Constructor Detail |
public NormalGenericFile(java.io.File underlyingFile)
File
.
public NormalGenericFile(java.lang.String name)
Method Detail |
public java.lang.String getHumanName()
GenericFile
getHumanName
in interface GenericFile
public java.lang.String getCanonicalID()
GenericFile
getCanonicalID
in interface GenericFile
public java.lang.String getLocalName()
GenericFile
getLocalName
in interface GenericFile
public java.io.InputStream getInputStream() throws java.io.IOException
InputStream
.
getInputStream
in interface GenericFile
java.io.IOException
- May be thrown for many reasons,
including no such file and read permission denied.public GenericFile getSibling(java.lang.String n)
GenericFile
n
. No attempt is made to verify whether or not that file exists.
In cases where the notion of "containing directory" makes no sense (e.g., streams or root directories), null is returned.
getSibling
in interface GenericFile
n
. No
attempt is made to verify whether or not that file exists. In
cases where the notion of "containing directory" makes no sense
(e.g., streams or root directories), null is returned.
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |