|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.itr_rescue.dataGuard.localFileSystem.JFMFile org.itr_rescue.dataGuard.localFileSystem.JFMLocalFile
public class JFMLocalFile
TODO change me!!!
Field Summary |
---|
Fields inherited from class org.itr_rescue.dataGuard.localFileSystem.JFMFile |
---|
data, displayName, marked, multiPart |
Constructor Summary | |
---|---|
JFMLocalFile(java.lang.Object data)
Constructor of this file. |
Method Summary | |
---|---|
boolean |
canRead()
Tests whether the application can read the file denoted by the abstract pathname. |
boolean |
canWrite()
Tests whether the application can modify to the file denoted by the abstract pathname. |
int |
compareTo(JFMFile pathname)
Compares two abstract pathnames lexicographically. |
JFMFile |
createFile(java.lang.String name)
Creates the file named by the abstract pathname denoted by the parameter. |
boolean |
delete()
Deletes the file or directory denoted by the abstract pathname. |
boolean |
equals(java.lang.Object obj)
Tests this abstract pathname for equality with the given object. |
boolean |
exists()
Tests whether the file or directory denoted by the abstract pathname exists. |
JFMFile |
getAbsoluteFile()
Returns the absolute form of this abstract pathname. |
java.lang.String |
getAbsolutePath()
Returns the absolute pathname string of this abstract pathname. |
JFMFile |
getCanonicalFile()
Returns the canonical form of this abstract pathname. |
java.lang.String |
getCanonicalPath()
Returns the canonical pathname string of this abstract pathname. |
java.io.File |
getFile()
gets the content of the JFMFile if it exists. |
javax.swing.Icon |
getIcon()
Returns the filesystem's icon associated with this file, or null if it can't be determined. |
java.io.InputStream |
getInputStream()
Returns an InputStream to read from this file, or null if it can't be done (the filesystem doesn't support it) |
java.lang.String |
getMimeType()
This method returns the string that represents the mime-type of this file, or null if it can't be determined. |
java.lang.String |
getName()
This string represents the short name of the file (e.g. |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream to write to this file, or null if the write operation isn't supported (or doesn;t make sense from the filesystem's point of view). |
java.lang.String |
getParent()
Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory. |
JFMFile |
getParentFile()
Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent
directory. |
java.lang.String |
getPath()
Converts this abstract pathname into a pathname string. |
java.lang.String |
getSystemDisplayName()
Returns the system display name as returned by the filesystem viewer, or null |
int |
hashCode()
Computes a hash code for this abstract pathname. |
boolean |
isAbsolute()
Tests whether this abstract pathname is absolute. |
boolean |
isDirectory()
Tests whether the file denoted by this abstract pathname is a directory. |
boolean |
isFile()
Tests whether the file denoted by this abstract pathname is a normal file. |
boolean |
isHidden()
Tests whether the file named by this abstract pathname is a hidden file. |
long |
lastModified()
Returns the time that the file denoted by this abstract pathname was last modified. |
long |
length()
Returns the length of the file denoted by this abstract pathname. |
JFMFile[] |
listFiles()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. |
JFMFile |
mkdir(java.lang.String name)
Creates the directory named by the abstract pathname denoted by the parameter. |
Methods inherited from class org.itr_rescue.dataGuard.localFileSystem.JFMFile |
---|
compareTo, getDisplayName, getMultiPart, getRootDriveFile, isMarked, setDisplayName, setMarked, setMultiPart, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JFMLocalFile(java.lang.Object data)
Method Detail |
---|
public java.io.InputStream getInputStream()
JFMFile
getInputStream
in class JFMFile
org.jfm.md.filesystems.JFMFile#getInputStream()
public JFMFile[] listFiles()
JFMFile
If this abstract pathname does not denote a directory, then this
method returns null
. Otherwise an array of
File
objects is returned, one for each file or directory in
the directory. Pathnames denoting the directory itself and the
directory's parent directory are not included in the result. Each
resulting abstract pathname is constructed from this abstract pathname
using the
constructor. Therefore if this pathname
is absolute then each resulting pathname is absolute; if this pathname
is relative then each resulting pathname will be relative to the same
directory.
File(File, String)
There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.
listFiles
in class JFMFile
null
if this abstract pathname
does not denote a directory, or if an I/O error occurs.org.jfm.md.filesystems.JFMFile#listFiles()
public java.io.OutputStream getOutputStream()
JFMFile
getOutputStream
in class JFMFile
org.jfm.md.filesystems.JFMFile#getOutputStream()
public java.lang.String getName()
JFMFile
getName
in class JFMFile
org.jfm.md.filesystems.JFMFile#getName()
public java.lang.String getParent()
JFMFile
null
if this pathname does not name a parent directory.
The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.
getParent
in class JFMFile
null
if this pathname
does not name a parentorg.jfm.md.filesystems.JFMFile#getParent()
public java.lang.String getMimeType()
JFMFile
getMimeType
in class JFMFile
org.jfm.md.filesystems.JFMFile#getMimeType()
public JFMFile getParentFile()
JFMFile
null
if this pathname does not name a parent
directory.
The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.
getParentFile
in class JFMFile
null
if this pathname
does not name a parentorg.jfm.md.filesystems.JFMFile#getParentFile()
public java.lang.String getPath()
JFMFile
default name-separator character
to
separate the names in the name sequence.
getPath
in class JFMFile
org.jfm.md.filesystems.JFMFile#getPath()
public boolean isAbsolute()
JFMFile
"/"
. On Microsoft Windows systems, a
pathname is absolute if its prefix is a drive specifier followed by
"\\"
, or if its prefix is "\\"
.
Some other filesystems implementations (FTP, NFS, SMB, etc.) can have their own definition
of the absolute pathname, ven though I would recommend sticking to the UNIX definition.
isAbsolute
in class JFMFile
true
if this abstract pathname is absolute,
false
otherwiseorg.jfm.md.filesystems.JFMFile#isAbsolute()
public java.lang.String getAbsolutePath()
JFMFile
If this abstract pathname is already absolute, then the pathname
string is simply returned as if by the
method. If this abstract pathname is the empty abstract pathname then
the pathname string of the current user directory, which is named by the
system property JFMFile.getPath()
user.dir
, is returned. Otherwise this
pathname is resolved in a system-dependent way. On UNIX systems, a
relative pathname is made absolute by resolving it against the current
user directory. On Microsoft Windows systems, a relative pathname is made absolute
by resolving it against the current directory of the drive named by the
pathname, if any; if not, it is resolved against the current user
directory.
getAbsolutePath
in class JFMFile
org.jfm.md.filesystems.JFMFile#getAbsolutePath()
public JFMFile getAbsoluteFile()
JFMFile
getAbsoluteFile
in class JFMFile
org.jfm.md.filesystems.JFMFile#getAbsoluteFile()
public java.lang.String getCanonicalPath() throws FSException
JFMFile
A canonical pathname is both absolute and unique. The precise
definition of canonical form is system-dependent. This method first
converts this pathname to absolute form if necessary, as if by invoking the
JFMFile.getAbsolutePath()
method, and then maps it to its unique form in a
system-dependent way. This typically involves removing redundant names
such as "." and ".." from the pathname, resolving
symbolic links (on UNIX platforms), and converting drive letters to a
standard case (on Microsoft Windows platforms).
Every pathname that denotes an existing file or directory has a unique canonical form. Every pathname that denotes a nonexistent file or directory also has a unique canonical form. The canonical form of the pathname of a nonexistent file or directory may be different from the canonical form of the same pathname after the file or directory is created. Similarly, the canonical form of the pathname of an existing file or directory may be different from the canonical form of the same pathname after the file or directory is deleted.
getCanonicalPath
in class JFMFile
FSException
- If an filesystem error occurs, which is possible because the
construction of the canonical pathname may require
filesystem queriesorg.jfm.md.filesystems.JFMFile#getCanonicalPath()
public JFMFile getCanonicalFile() throws FSException
JFMFile
getCanonicalFile
in class JFMFile
FSException
- If an filesystem error occurs, which is possible because the
construction of the canonical pathname may require
filesystem queriesorg.jfm.md.filesystems.JFMFile#getCanonicalFile()
public boolean isDirectory()
JFMFile
isDirectory
in class JFMFile
true
if and only if the file denoted by this
abstract pathname exists and is a directory;
false
otherwiseorg.jfm.md.filesystems.JFMFile#isDirectory()
public boolean isFile()
JFMFile
isFile
in class JFMFile
true
if and only if the file denoted by this
abstract pathname exists and is a normal file;
false
otherwiseorg.jfm.md.filesystems.JFMFile#isFile()
public boolean isHidden()
JFMFile
'.'
). On Microsoft Windows systems, a file is
considered to be hidden if it has been marked as such in the filesystem.
isHidden
in class JFMFile
true
if and only if the file denoted by this
abstract pathname is hidden according to the conventions of the
underlying platformorg.jfm.md.filesystems.JFMFile#isHidden()
public long lastModified()
JFMFile
lastModified
in class JFMFile
long
value representing the time the file was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L
if the
file does not exist or if an I/O error occursorg.jfm.md.filesystems.JFMFile#lastModified()
public long length()
JFMFile
length
in class JFMFile
0L
if the file does not existorg.jfm.md.filesystems.JFMFile#length()
public int compareTo(JFMFile pathname)
JFMFile
compareTo
in class JFMFile
pathname
- The abstract pathname to be compared to this abstract
pathname
org.jfm.md.filesystems.JFMFile#compareTo(org.jfm.md.filesystems.JFMFile)
public boolean equals(java.lang.Object obj)
JFMFile
true
if and only if the argument is not
null
and is an abstract pathname that denotes the same file
or directory as this abstract pathname. Whether or not two abstract
pathnames are equal depends upon the underlying system. On UNIX
systems, alphabetic case is significant in comparing pathnames; on Microsoft Windows
systems it is not. With other filesystems implementation ... it's their responsability
to decide wether it should be case sensitive or not.
equals
in class JFMFile
obj
- The object to be compared with this abstract pathname
true
if and only if the objects are the same;
false
otherwiseObject.equals(java.lang.Object)
public int hashCode()
JFMFile
1234321
. On Microsoft Windows systems, the hash
code is equal to the exclusive or of its pathname string,
convered to lower case, and the decimal value 1234321
.
hashCode
in class JFMFile
Object.hashCode()
public boolean canRead()
JFMFile
canRead
in class JFMFile
true
if and only if the file specified by this
abstract pathname exists and can be read by the
application; false
otherwiseorg.jfm.md.filesystems.JFMFile#canRead()
public boolean canWrite()
JFMFile
canWrite
in class JFMFile
true
if and only if the file system actually
contains a file denoted by this abstract pathname and
the application is allowed to write to the file;
false
otherwise.org.jfm.md.filesystems.JFMFile#canWrite()
public boolean exists()
JFMFile
exists
in class JFMFile
true
if and only if the file or directory denoted
by this abstract pathname exists; false
otherwiseorg.jfm.md.filesystems.JFMFile#exists()
public JFMFile mkdir(java.lang.String name)
JFMFile
mkdir
in class JFMFile
org.jfm.md.filesystems.JFMFile#mkdir()
public JFMFile createFile(java.lang.String name)
JFMFile
createFile
in class JFMFile
public boolean delete()
JFMFile
delete
in class JFMFile
true
if and only if the file or directory is
successfully deleted; false
otherwiseorg.jfm.md.filesystems.JFMFile#delete()
public javax.swing.Icon getIcon()
JFMFile
getIcon
in class JFMFile
org.jfm.md.filesystems.JFMFile#getIcon()
public java.lang.String getSystemDisplayName()
JFMFile
getSystemDisplayName
in class JFMFile
public java.io.File getFile()
JFMFile
getFile
in class JFMFile
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |