|
|||||||||
| Home >> All >> com >> memoire >> [ fu overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.memoire.fu
Class FuFileUrl

java.lang.Objectjava.io.File
com.memoire.fu.FuFile
com.memoire.fu.FuFileUrl
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- Direct Known Subclasses:
- FuFileFtp, FuFileHttp
- public class FuFileUrl
- extends FuFile
Remote file.
| Field Summary | |
protected boolean |
canRead_
|
protected boolean |
canWrite_
|
protected boolean |
exists_
|
protected boolean |
init_
|
protected long |
lastModified_
|
protected long |
length_
|
protected java.lang.String[] |
list_
|
protected java.lang.String |
name_
|
protected java.net.URL |
url_
|
| Fields inherited from class com.memoire.fu.FuFile |
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Fields inherited from class java.io.File |
|
| Constructor Summary | |
FuFileUrl(java.net.URL _url)
|
|
FuFileUrl(java.net.URL _a,
java.lang.String _n)
|
|
| Method Summary | |
boolean |
canRead()
This method tests whether or not the current thread is allowed to to read the file pointed to by this object. |
boolean |
canWrite()
This method test whether or not the current thread is allowed to write to this object. |
FuFile |
createChild(java.lang.String _name)
|
boolean |
createNewFile()
This method creates a new file of zero length with the same name as the path of this File object if an only if that file
does not already exist. |
boolean |
delete()
This method deletes the file represented by this object. |
void |
deleteOnExit()
Calling this method requests that the file represented by this object be deleted when the virtual machine exits. |
boolean |
equals(java.lang.Object _o)
This method tests two File objects for equality by
comparing the path of the specified File against the path
of this object. |
boolean |
exists()
This method tests whether or not the file represented by the object actually exists on the filesystem. |
java.lang.String |
getAbsolutePath()
This method returns the path of this file as an absolute path name. |
java.lang.String |
getCanonicalPath()
This method returns a canonical representation of the pathname of this file. |
java.net.URL |
getContentURL()
|
java.io.InputStream |
getInputStream()
|
java.lang.String |
getName()
This method returns the name of the file. |
java.io.OutputStream |
getOutputStream()
|
java.lang.String |
getParent()
This method returns a String the represents this file's
parent. |
java.lang.String |
getPath()
Returns the path name that represents this file. |
java.lang.String |
getViewText()
|
int |
hashCode()
This method returns a hash code representing this file. |
void |
init()
|
boolean |
isAbsolute()
This method returns true if this object represents an absolute file path and false if it does not. |
boolean |
isDirectory()
This method tests whether or not the file represented by this object is a directory. |
boolean |
isFile()
This method tests whether or not the file represented by this object is a "plain" file. |
boolean |
isHidden()
This method tests whether or not this file represents a "hidden" file. |
long |
lastModified()
This method returns the last modification time of this file. |
long |
length()
This method returns the length of the file represented by this object, or 0 if the specified file does not exist. |
java.lang.String[] |
list()
This method returns a array of String's representing the
list of files is then directory represented by this object. |
java.io.File[] |
listFiles()
This method returns an array of File objects representing
all the files in the directory represented by this object. |
boolean |
mkdir()
This method creates a directory for the path represented by this object. |
boolean |
mkdirs()
This method creates a directory for the path represented by this file. |
protected java.util.Vector |
readList(java.io.BufferedReader _nr)
|
boolean |
renameTo(java.io.File _dest)
This method renames the file represented by this object to the path of the file represented by the argument File. |
boolean |
setLastModified(long _time)
This method sets the modification time on the file to the specified value. |
void |
setName(java.lang.String _name)
|
boolean |
setReadOnly()
This method sets the file represented by this object to be read only. |
java.lang.String |
toString()
This method returns a String that is the path name of the
file as returned by getPath. |
java.net.URL |
toURL()
This method returns a URL with the file:
protocol that represents this file. |
| Methods inherited from class com.memoire.fu.FuFile |
convertToFuFile, createFile, createFile, ensureFuFile, getAbsoluteFile, getAbsoluteFuFile, getCanonicalFile, getCanonicalFuFile, getParentFile, getParentFuFile |
| Methods inherited from class java.io.File |
compareTo, compareTo, createTempFile, createTempFile, list, listFiles, listFiles, listRoots, toURI |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
url_
protected java.net.URL url_
name_
protected java.lang.String name_
init_
protected boolean init_
exists_
protected boolean exists_
lastModified_
protected long lastModified_
length_
protected long length_
list_
protected java.lang.String[] list_
canRead_
protected boolean canRead_
canWrite_
protected boolean canWrite_
| Constructor Detail |
FuFileUrl
public FuFileUrl(java.net.URL _a, java.lang.String _n) throws java.net.MalformedURLException
FuFileUrl
public FuFileUrl(java.net.URL _url)
| Method Detail |
init
public final void init()
readList
protected java.util.Vector readList(java.io.BufferedReader _nr) throws java.io.IOException
getContentURL
public java.net.URL getContentURL()
createChild
public final FuFile createChild(java.lang.String _name)
- Specified by:
createChildin classFuFile
getInputStream
public final java.io.InputStream getInputStream() throws java.io.IOException
- Specified by:
getInputStreamin classFuFile
getOutputStream
public final java.io.OutputStream getOutputStream() throws java.io.IOException
- Specified by:
getOutputStreamin classFuFile
getViewText
public final java.lang.String getViewText()
- Overrides:
getViewTextin classFuFile
canRead
public final boolean canRead()
- Description copied from class:
java.io.File - This method tests whether or not the current thread is allowed to
to read the file pointed to by this object. This will be true if and
and only if 1) the file exists and 2) the
SecurityManager(if any) allows access to the file via it'scheckReadmethod 3) the file is readable.
canWrite
public final boolean canWrite()
- Description copied from class:
java.io.File - This method test whether or not the current thread is allowed to
write to this object. This will be true if and only if 1) The
SecurityManager(if any) allows write access to the file and 2) The file exists and 3) The file is writable. To determine whether or not a non-existent file can be created, check the parent directory for write access.
createNewFile
public final boolean createNewFile()
- Description copied from class:
java.io.File - This method creates a new file of zero length with the same name as
the path of this
Fileobject if an only if that file does not already exist.A
SecurityManager.checkWritecheck is done prior to performing this action.
delete
public final boolean delete()
- Description copied from class:
java.io.File - This method deletes the file represented by this object. If this file
is a directory, it must be empty in order for the delete to succeed.
deleteOnExit
public final void deleteOnExit()
- Description copied from class:
java.io.File - Calling this method requests that the file represented by this object
be deleted when the virtual machine exits. Note that this request cannot
be cancelled. Also, it will only be carried out if the virtual machine
exits normally.
equals
public final boolean equals(java.lang.Object _o)
- Description copied from class:
java.io.File - This method tests two
Fileobjects for equality by comparing the path of the specifiedFileagainst the path of this object. The two objects are equal if an only if 1) The argument is not null 2) The argument is aFileobject and 3) The path of theFileargument is equal to the path of this object.The paths of the files are determined by calling the
getPath()method on each object.
exists
public final boolean exists()
- Description copied from class:
java.io.File - This method tests whether or not the file represented by the object
actually exists on the filesystem.
getAbsolutePath
public java.lang.String getAbsolutePath()
- Description copied from class:
java.io.File - This method returns the path of this file as an absolute path name.
If the path name is already absolute, then it is returned. Otherwise
the value returned is the current directory plus the separatory
string plus the path of the file. The current directory is determined
from the
user.dirsystem property.
getCanonicalPath
public final java.lang.String getCanonicalPath()
- Description copied from class:
java.io.File - This method returns a canonical representation of the pathname of
this file. The actual form of the canonical representation is
different. On the GNU system, the canonical form differs from the
absolute form in that all relative file references to "." and ".."
are resolved and removed.
Note that this method, unlike the other methods which return path names, can throw an IOException. This is because native method might be required in order to resolve the canonical path
setName
public final void setName(java.lang.String _name)
getName
public final java.lang.String getName()
- Description copied from class:
java.io.File - This method returns the name of the file. This is everything in the
complete path of the file after the last instance of the separator
string.
getParent
public final java.lang.String getParent()
- Description copied from class:
java.io.File - This method returns a
Stringthe represents this file's parent.nullis returned if the file has no parent. The parent is determined via a simple operation which removes the
getPath
public final java.lang.String getPath()
- Description copied from class:
java.io.File - Returns the path name that represents this file. May be a relative
or an absolute path name
hashCode
public final int hashCode()
- Description copied from class:
java.io.File - This method returns a hash code representing this file. It is the
hash code of the path of this file (as returned by
getPath()) exclusived or-ed with the value 1234321.
isAbsolute
public final boolean isAbsolute()
- Description copied from class:
java.io.File - This method returns true if this object represents an absolute file
path and false if it does not. The definition of an absolute path varies
by system. As an example, on GNU systems, a path is absolute if it starts
with a "/".
isDirectory
public final boolean isDirectory()
- Description copied from class:
java.io.File - This method tests whether or not the file represented by this object
is a directory. In order for this method to return
true, the file represented by this object must exist and be a directory.
isFile
public final boolean isFile()
- Description copied from class:
java.io.File - This method tests whether or not the file represented by this object
is a "plain" file. A file is a plain file if and only if it 1) Exists,
2) Is not a directory or other type of special file.
isHidden
public final boolean isHidden()
- Description copied from class:
java.io.File - This method tests whether or not this file represents a "hidden" file.
On GNU systems, a file is hidden if its name begins with a "."
character. Files with these names are traditionally not shown with
directory listing tools.
lastModified
public final long lastModified()
- Description copied from class:
java.io.File - This method returns the last modification time of this file. The
time value returned is an abstract value that should not be interpreted
as a specified time value. It is only useful for comparing to other
such time values returned on the same system. In that case, the larger
value indicates a more recent modification time.
If the file does not exist, then a value of 0 is returned.
length
public final long length()
- Description copied from class:
java.io.File - This method returns the length of the file represented by this object,
or 0 if the specified file does not exist.
list
public final java.lang.String[] list()
- Description copied from class:
java.io.File - This method returns a array of
String's representing the list of files is then directory represented by this object. If this object represents a non-directory file or a non-existent file, thennullis returned. The list of files will not contain any names such as "." or ".." which indicate the current or parent directory. Also, the names are not guaranteed to be sorted.A
SecurityManagercheck is made prior to reading the directory. If read access to the directory is denied, an exception will be thrown.
listFiles
public final java.io.File[] listFiles()
- Description copied from class:
java.io.File - This method returns an array of
Fileobjects representing all the files in the directory represented by this object. If this object does not represent a directory,nullis returned. Each of the returnedFileobject is constructed with this object as its parent.A
SecurityManagercheck is made prior to reading the directory. If read access to the directory is denied, an exception will be thrown.
mkdir
public boolean mkdir()
- Description copied from class:
java.io.File - This method creates a directory for the path represented by this object.
mkdirs
public final boolean mkdirs()
- Description copied from class:
java.io.File - This method creates a directory for the path represented by this file.
It will also create any intervening parent directories if necessary.
renameTo
public final boolean renameTo(java.io.File _dest)
- Description copied from class:
java.io.File - This method renames the file represented by this object to the path
of the file represented by the argument
File.
setLastModified
public final boolean setLastModified(long _time)
- Description copied from class:
java.io.File - This method sets the modification time on the file to the specified
value. This is specified as the number of seconds since midnight
on January 1, 1970 GMT.
setReadOnly
public final boolean setReadOnly()
- Description copied from class:
java.io.File - This method sets the file represented by this object to be read only.
A read only file or directory cannot be modified. Please note that
GNU systems allow read only files to be deleted if the directory it
is contained in is writable.
toString
public final java.lang.String toString()
- Description copied from class:
java.io.File - This method returns a
Stringthat is the path name of the file as returned bygetPath.
toURL
public final java.net.URL toURL()
- Description copied from class:
java.io.File - This method returns a
URLwith thefile:protocol that represents this file. The exact form of this URL is system dependent.
|
|||||||||
| Home >> All >> com >> memoire >> [ fu overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC