| Modifier and Type | Field and Description |
|---|---|
| private FileLock | |
| private FileChannel | |
| private RandomAccessFile |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| 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 synchronized 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. |
| public InputStream | Returns: an input stream suitable for reading from the file.Implements org. Creates an input stream from a file name. |
| 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. |
| 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. 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 (read/write) file. |
| public void | limitAccessToOwner()
Implements org. Use when creating a new file. |
| public synchronized 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. |
| dbLock | back to summary |
|---|---|
| private FileLock dbLock | |
| lockFileChannel | back to summary |
|---|---|
| private FileChannel lockFileChannel | |
| lockFileOpen | back to summary |
|---|---|
| private RandomAccessFile lockFileOpen | |
| DirFile | back to summary |
|---|---|
| pack-priv DirFile(String path) Construct a DirFile from a path name.
| |
| DirFile | back to summary |
|---|---|
| pack-priv DirFile(String directoryName, String fileName) Construct a DirFile from a directory name and a file name. | |
| DirFile | back to summary |
|---|---|
| pack-priv DirFile(DirFile directoryName, String fileName) Construct a DirFile from a directory name and a file name. | |
| 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.
| |
| getExclusiveFileLock | back to summary |
|---|---|
| public synchronized int getExclusiveFileLock() throws StandardException Implements org. Get an exclusive lock. 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 InputStream getInputStream() throws FileNotFoundException Implements org. Creates an input stream from a file name.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() throws FileNotFoundException Implements org. Creates an output stream from a file name.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream(final boolean append) throws FileNotFoundException Implements org. Creates an output stream from a file name.
| |
| getParentDir | back to summary |
|---|---|
| public StorageFile getParentDir() Implements org. Get the name of the parent directory if this name includes a parent.
| |
| getRandomAccessFile | back to summary |
|---|---|
| public StorageRandomAccessFile getRandomAccessFile(String mode) throws FileNotFoundException Implements org. Get a random access (read/write) file.
| |
| limitAccessToOwner | back to summary |
|---|---|
| public void limitAccessToOwner() throws IOException 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 | |
| releaseExclusiveFileLock | back to summary |
|---|---|
| public synchronized 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.
| |