|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.util.base.AbstractReadableFile
public abstract class AbstractReadableFile
This abstract class can be used as a starting point for ReadableFile
implementations.
Constructor Summary | |
---|---|
AbstractReadableFile()
|
Method Summary | |
---|---|
long |
getDataSize()
This calls getSize() to get the size. |
EntityLock |
getReadLock()
This method returns a NoObjectDummyLock . |
boolean |
isReadLockedByCurrentThread()
This method always returns true . |
EntityLock |
lockForReading()
This method returns a NoObjectDummyLock . |
ReadableByteChannel |
openChannelForRead()
This opens a byte channel on the InputStream returned from
openForRead . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.entityfs.ReadableFile |
---|
getSize, openForRead |
Constructor Detail |
---|
public AbstractReadableFile()
Method Detail |
---|
public EntityLock getReadLock()
NoObjectDummyLock
.
getReadLock
in interface ReadLockable
public EntityLock lockForReading()
NoObjectDummyLock
.
lockForReading
in interface ReadLockable
public boolean isReadLockedByCurrentThread()
true
. Override it to change that
behavior.
isReadLockedByCurrentThread
in interface ReadLockable
true
if the lockable object is read or write locked by
the current thread.public ReadableByteChannel openChannelForRead()
InputStream
returned from
openForRead
.
openChannelForRead
in interface ReadableFile
ReadableFile.openForRead()
public long getDataSize()
getSize()
to get the size. Subclasses may override
this method if the data size is different from the file size.
getDataSize
in interface ReadableFile
ReadableFile.getSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |