Package org.apache.derby.impl.io
Class URLFile
- java.lang.Object
-
- org.apache.derby.impl.io.InputStreamFile<URLStorageFactory>
-
- org.apache.derby.impl.io.URLFile
-
- All Implemented Interfaces:
StorageFile
class URLFile extends InputStreamFile<URLStorageFactory>
This class provides a http based implementation of the StorageFile interface. It is used by the database engine to access persistent data and transaction logs under the http and https subsubprotocols.
-
-
Field Summary
-
Fields inherited from class org.apache.derby.impl.io.InputStreamFile
nameStart, path, storageFactory
-
Fields inherited from interface org.apache.derby.io.StorageFile
EXCLUSIVE_FILE_LOCK, EXCLUSIVE_FILE_LOCK_NOT_AVAILABLE, NO_FILE_LOCK_SUPPORT
-
-
Constructor Summary
Constructors Modifier Constructor Description (package private)URLFile(URLFile dir, java.lang.String name)(package private)URLFile(URLStorageFactory storageFactory, java.lang.String path)privateURLFile(URLStorageFactory storageFactory, java.lang.String child, int pathLen)(package private)URLFile(URLStorageFactory storageFactory, java.lang.String parent, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Tests whether the named file exists.java.io.InputStreamgetInputStream()Creates an input stream from a file name.(package private) StorageFilegetParentDir(int pathLen)Get the parent of this file.-
Methods inherited from class org.apache.derby.impl.io.InputStreamFile
canWrite, createNewFile, delete, deleteAll, equals, getCanonicalPath, getExclusiveFileLock, getName, getOutputStream, getOutputStream, getParentDir, getPath, getRandomAccessFile, hashCode, isDirectory, limitAccessToOwner, list, mkdir, mkdirs, releaseExclusiveFileLock, renameTo, setReadOnly, toString
-
-
-
-
Constructor Detail
-
URLFile
URLFile(URLStorageFactory storageFactory, java.lang.String path)
-
URLFile
URLFile(URLStorageFactory storageFactory, java.lang.String parent, java.lang.String name)
-
URLFile
URLFile(URLFile dir, java.lang.String name)
-
URLFile
private URLFile(URLStorageFactory storageFactory, java.lang.String child, int pathLen)
-
-
Method Detail
-
exists
public boolean exists()
Tests whether the named file exists.- Specified by:
existsin interfaceStorageFile- Specified by:
existsin classInputStreamFile<URLStorageFactory>- Returns:
- true if the named file exists, false if not.
-
getParentDir
StorageFile getParentDir(int pathLen)
Get the parent of this file.- Specified by:
getParentDirin classInputStreamFile<URLStorageFactory>- Parameters:
pathLen- the length of the parent's path name.
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.FileNotFoundExceptionCreates an input stream from a file name.- Specified by:
getInputStreamin interfaceStorageFile- Specified by:
getInputStreamin classInputStreamFile<URLStorageFactory>- Returns:
- an input stream suitable for reading from the file.
- Throws:
java.io.FileNotFoundException- if the file is not found.
-
-