|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.io.vfmem.DataStoreEntry
public class DataStoreEntry
A data store entry representing either a file or a directory.
If the entry is a directory, it doesn't create a data object.
Field Summary | |
---|---|
private boolean |
isDir
Tells if this entry is a directory or a regular file. |
private boolean |
isReadOnly
Tells if this entry is read-only or not. |
private java.lang.String |
path
The path of this entry. |
private boolean |
released
Tells if the entry has been released or not. |
private BlockedByteArray |
src
The data of the entry. |
Constructor Summary | |
---|---|
DataStoreEntry(java.lang.String path,
boolean isDir)
Creates a new data store entry. |
Method Summary | |
---|---|
private void |
checkIfReleased()
Checks if this entry has been released. |
(package private) BlockedByteArrayInputStream |
getInputStream()
Returns an input stream to read from this entry. |
(package private) BlockedByteArrayOutputStream |
getOutputStream(boolean append)
Returns an output stream to write into this entry. |
boolean |
isDirectory()
Tells if this entry is a directory. |
boolean |
isReadOnly()
Tells if this entry is read-only. |
long |
length()
Returns the length of this entry. |
(package private) void |
release()
Relases this entry. |
void |
setLength(long newLength)
Sets the length of this entry. |
void |
setReadOnly()
Makes this entry read-only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String path
private final boolean isDir
private boolean isReadOnly
private final BlockedByteArray src
private volatile boolean released
Constructor Detail |
---|
public DataStoreEntry(java.lang.String path, boolean isDir)
path
- the path of the entryisDir
- whether the entry is a directory or a regular fileMethod Detail |
---|
public boolean isDirectory()
true
if directory, false
otherwise.BlockedByteArrayInputStream getInputStream() throws java.io.FileNotFoundException
InputStream
-object.
java.io.FileNotFoundException
- if this entry is a directoryBlockedByteArrayOutputStream getOutputStream(boolean append) throws java.io.FileNotFoundException
append
- tells whether the entry should be appended or not
OutputStream
-object.
java.io.FileNotFoundException
- if this entry is a directory, or is
read-onlypublic long length()
public void setReadOnly()
public boolean isReadOnly()
true
is read-only, false
if not.void release()
public void setLength(long newLength)
newLength
- the length in number of bytesprivate void checkIfReleased()
java.lang.IllegalStateException
- if the entry has been released
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |