Top Description Fields Constructors Methods
org.apache.derby.impl.io

pack-priv Class JarDBFile

extends InputStreamFile<JarStorageFactory>
Class Inheritance
Imports
org.apache.derby.io.StorageFile, java.io.InputStream, .IOException, .FileNotFoundException, java.util.zip.ZipEntry

This class provides a jar file based implementation of the StorageFile interface. It is used by the database engine to access persistent data and transaction logs under the jar subsubprotocol.

Field Summary

Inherited from org.apache.derby.impl.io.InputStreamFile:
nameStartpathstorageFactory

Constructor Summary

AccessConstructor and Description
pack-priv
JarDBFile(JarStorageFactory storageFactory, String path)

pack-priv
JarDBFile(JarStorageFactory storageFactory, String parent, String name)

pack-priv
private
JarDBFile(JarStorageFactory storageFactory, String child, int pathLen)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the named file exists, false if not.
exists
()

Implements abstract org.apache.derby.impl.io.InputStreamFile.exists.

Implements org.apache.derby.io.StorageFile.exists.

Tests whether the named file exists.

private ZipEntry
public InputStream

Returns:

an input stream suitable for reading from the file.
getInputStream
()

Implements abstract org.apache.derby.impl.io.InputStreamFile.getInputStream.

Implements org.apache.derby.io.StorageFile.getInputStream.

Creates an input stream from a file name.

pack-priv StorageFile

Returns:

An StorageFile denoting the parent directory of this StorageFile, if it has a parent, null if it does not have a parent.
getParentDir
(int
the length of the parent's path name.
pathLen
)

Implements abstract org.apache.derby.impl.io.InputStreamFile.getParentDir.

Get the name of the parent directory if this name includes a parent.

public String

Returns:

the file name
toString
()

Overrides org.apache.derby.impl.io.InputStreamFile.toString.

Get the file name for diagnostic purposes.

Inherited from org.apache.derby.impl.io.InputStreamFile:
canWritecreateNewFiledeletedeleteAllequalsgetCanonicalPathgetExclusiveFileLockgetNamegetOutputStreamgetOutputStreamgetParentDirgetPathgetRandomAccessFilehashCodeisDirectorylimitAccessToOwnerlistmkdirmkdirsreleaseExclusiveFileLockrenameTosetReadOnly

Constructor Detail

JarDBFileback to summary
pack-priv JarDBFile(JarStorageFactory storageFactory, String path)
JarDBFileback to summary
pack-priv JarDBFile(JarStorageFactory storageFactory, String parent, String name)
JarDBFileback to summary
pack-priv JarDBFile(JarDBFile dir, String name)
JarDBFileback to summary
private JarDBFile(JarStorageFactory storageFactory, String child, int pathLen)

Method Detail

existsback to summary
public boolean exists()

Implements abstract org.apache.derby.impl.io.InputStreamFile.exists.

Implements org.apache.derby.io.StorageFile.exists.

Tests whether the named file exists.

Returns:boolean

true if the named file exists, false if not.

getEntryback to summary
private ZipEntry getEntry()
getInputStreamback to summary
public InputStream getInputStream() throws FileNotFoundException

Implements abstract org.apache.derby.impl.io.InputStreamFile.getInputStream.

Implements org.apache.derby.io.StorageFile.getInputStream.

Creates an input stream from a file name.

Returns:InputStream

an input stream suitable for reading from the file.

Exceptions
FileNotFoundException:
if the file is not found.
getParentDirback to summary
pack-priv StorageFile getParentDir(int pathLen)

Implements abstract org.apache.derby.impl.io.InputStreamFile.getParentDir.

Get the name of the parent directory if this name includes a parent.

Parameters
pathLen:int

Doc from org.apache.derby.impl.io.InputStreamFile.getParentDir.

the length of the parent's path name.

Returns:StorageFile

An StorageFile denoting the parent directory of this StorageFile, if it has a parent, null if it does not have a parent.

toStringback to summary
public String toString()

Overrides org.apache.derby.impl.io.InputStreamFile.toString.

Get the file name for diagnostic purposes. Usually the same as getPath().

Returns:String

the file name