| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final String | |
| pack-priv final F |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the file exists and is writable, false if not.Implements org. Determine whether the named file is writable. |
| public boolean | Returns: true if this thread's invocation of createNewFile successfully created the named file; false if not, i.e. false if the named file already exists or if another concurrent thread created it.Implements org. If the named file does not already exist then create it as an empty normal file. |
| public boolean | Returns: true if the named file or directory is successfully deleted, false if notImplements org. Deletes the named file or empty directory. |
| public boolean | Returns: true if the named file or directory is successfully deleted, false if notImplements org. Deletes the named file and, if it is a directory, all the files and directories it contains. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public abstract boolean | Returns: true if the named file exists, false if not.Redeclares org. Tests whether the named file exists. |
| public String | getCanonicalPath()
Implements org. Converts this StorageFile into a canonical pathname string. |
| public int | Returns: EXCLUSIVE_FILE_LOCK_NOT_AVAILABLE if the lock cannot be acquired because it is already held.EXCLUSIVE_FILE_LOCK if the lock was successfully acquired. NO_FILE_LOCK_SUPPORT if the system does not support exclusive locks. Implements org. Get an exclusive lock with this name. |
| public abstract InputStream | Returns: an input stream suitable for reading from the file.Redeclares org. Creates an input stream from a file name. |
| public String | Returns: The last segment in the path name, "" if the path name sequence is empty.Implements org.
|
| public OutputStream | Returns: an output stream suitable for writing to the file.Implements org. Creates an output stream from a file name. |
| public OutputStream | Returns: an output stream suitable for writing to the file.If true then data will be appended to the end of the file, if it already exists.
If false and a normal file already exists with this name the file will first be truncated
to zero length. append)Implements org. Creates an output stream from a file name. |
| public StorageFile | Returns: An StorageFile denoting the parent directory of this StorageFile, if it has a parent, null if it does not have a parent.Implements org. Get the name of the parent directory if this name includes a parent. |
| pack-priv abstract StorageFile | |
| public String | Returns: The pathname as a string.Implements org. Converts this StorageFile into a pathname string. |
| public StorageRandomAccessFile | Returns: an object that can be used for random access to the file."r", "rw", "rws", or "rwd". The "rws" and "rwd" modes specify
that the data is to be written to persistent store, consistent with the
java.io.RandomAccessFile class ("synchronized" with the persistent
storage, in the file system meaning of the word "synchronized"). However
the implementation is not required to implement the "rws" or "rwd"
modes. The implementation may treat "rws" and "rwd" as "rw". It is up to
the user of this interface to call the StorageRandomAccessFile.sync
method. However, if the "rws" or "rwd" modes are supported and the
RandomAccessFile was opened in "rws" or "rwd" mode then the
implementation of StorageRandomAccessFile.sync need not do anything. mode)Implements org. Get a random access file. |
| public int | |
| public boolean | Returns: true if named file exists and is a directory, false if not. The return value is undefined if the storage is read-only.Implements org. Tests whether the named file is a directory, or not. |
| public void | limitAccessToOwner()
Implements org. Use when creating a new file. |
| public String[] | Returns: An array of the names of the files and directories in this directory denoted by this abstract pathname. The returned array will have length 0 if this directory is empty. Returns null if this StorageFile is not a directory, or if an I/O error occurs.Implements org. Get the names of all files and sub-directories in the directory named by this path name. |
| public boolean | Returns: true if the directory was created; false if not.Implements org. Creates the named directory. |
| public boolean | Returns: true if the directory was created, false if notImplements org. Creates the named directory, and all nonexistent parent directories. |
| public void | releaseExclusiveFileLock()
Implements org. Release the resource associated with an earlier acquired exclusive lock |
| public boolean | Returns: true if the rename succeeded, false if not.the new name. newName)Implements org. Rename the file denoted by this name. |
| public boolean | Returns: true if the named file or directory was made read-only, or it already was read-only; false if not.Implements org. Make the named file or directory read-only. |
| public String | Returns: the file nameOverrides java. Get the file name for diagnostic purposes. |
| nameStart | back to summary |
|---|---|
| pack-priv final int nameStart | |
| path | back to summary |
|---|---|
| pack-priv final String path | |
| storageFactory | back to summary |
|---|---|
| pack-priv final F storageFactory | |
| InputStreamFile | back to summary |
|---|---|
| pack-priv InputStreamFile(F storageFactory, String path) | |
| InputStreamFile | back to summary |
|---|---|
| pack-priv InputStreamFile(F storageFactory, String parent, String name) | |
| InputStreamFile | back to summary |
|---|---|
| pack-priv InputStreamFile(InputStreamFile<F> dir, String name) | |
| InputStreamFile | back to summary |
|---|---|
| pack-priv InputStreamFile(F storageFactory, String child, int pathLen) | |
| canWrite | back to summary |
|---|---|
| public boolean canWrite() Implements org. Determine whether the named file is writable.
| |
| createNewFile | back to summary |
|---|---|
| public boolean createNewFile() throws IOException Implements org. If the named file does not already exist then create it as an empty normal file. The implementation must synchronize with other threads accessing the same file (in the same or a different process). If two threads both attempt to create a file with the same name at the same time then at most one should succeed.
| |
| delete | back to summary |
|---|---|
| public boolean delete() Implements org. Deletes the named file or empty directory. This method does not delete non-empty directories.
| |
| deleteAll | back to summary |
|---|---|
| public boolean deleteAll() Implements org. Deletes the named file and, if it is a directory, all the files and directories it contains.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| exists | back to summary |
|---|---|
| public abstract boolean exists() Redeclares org. Tests whether the named file exists.
| |
| getCanonicalPath | back to summary |
|---|---|
| public String getCanonicalPath() throws IOException Implements org. Doc from org. Converts this StorageFile into a canonical pathname string. The form of the canonical path is system dependent.
| |
| getExclusiveFileLock | back to summary |
|---|---|
| public int getExclusiveFileLock() throws StandardException Implements org. Get an exclusive lock with this name. This is used to ensure that two or more JVMs do not open the same database at the same time.
| |
| getInputStream | back to summary |
|---|---|
| public abstract InputStream getInputStream() throws FileNotFoundException Redeclares org. Creates an input stream from a file name.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() throws FileNotFoundException Implements org. Creates an output stream from a file name. If a normal file already exists with this name it will first be truncated to zero length.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream(boolean append) throws FileNotFoundException Implements org. Creates an output stream from a file name. If a normal file already exists with this name it will first be truncated to zero length.
| |
| getParentDir | back to summary |
|---|---|
| public StorageFile getParentDir() Implements org. Get the name of the parent directory if this name includes a parent.
| |
| getParentDir | back to summary |
|---|---|
| pack-priv abstract StorageFile getParentDir(int pathLen) Get the parent of this file.
| |
| getPath | back to summary |
|---|---|
| public String getPath() Implements org. Converts this StorageFile into a pathname string. The character returned by StorageFactory.getSeparator() is used to separate the directory and file names in the sequence. The returned path may include the database directory. Therefore it cannot be directly used to make an StorageFile equivalent to this one.
| |
| getRandomAccessFile | back to summary |
|---|---|
| public StorageRandomAccessFile getRandomAccessFile(String mode) throws FileNotFoundException Implements org. Get a random access file.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isDirectory | back to summary |
|---|---|
| public boolean isDirectory() Implements org. Tests whether the named file is a directory, or not. This is only called in writable storage factories.
| |
| limitAccessToOwner | back to summary |
|---|---|
| public void limitAccessToOwner() Implements org. Doc from org. Use when creating a new file. By default, a file created in an
underlying file system, if applicable, will have read and write access
for the file owner unless the property | |
| list | back to summary |
|---|---|
| public String[] list() Implements org. Get the names of all files and sub-directories in the directory named by this path name.
| |
| mkdir | back to summary |
|---|---|
| public boolean mkdir() Implements org. Creates the named directory.
| |
| mkdirs | back to summary |
|---|---|
| public boolean mkdirs() Implements org. Creates the named directory, and all nonexistent parent directories.
| |
| releaseExclusiveFileLock | back to summary |
|---|---|
| public void releaseExclusiveFileLock() Implements org. Release the resource associated with an earlier acquired exclusive lock
| |
| renameTo | back to summary |
|---|---|
| public boolean renameTo(StorageFile newName) Implements org. Rename the file denoted by this name. Note that StorageFile objects are immutable. This method renames the underlying file, it does not change this StorageFile object. The StorageFile object denotes the same name as before, however the exists() method will return false after the renameTo method executes successfully. It is not specified whether this method will succeed if a file already exists under the new name.
| |
| setReadOnly | back to summary |
|---|---|
| public boolean setReadOnly() Implements org. Make the named file or directory read-only. This interface does not specify whether this also makes the file undeletable.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Get the file name for diagnostic purposes. Usually the same as getPath(). | |