|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| 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 ReadLockablepublic EntityLock lockForReading()
NoObjectDummyLock.
lockForReading in interface ReadLockablepublic boolean isReadLockedByCurrentThread()
true. Override it to change that
behavior.
isReadLockedByCurrentThread in interface ReadLockabletrue if the lockable object is read or write locked by
the current thread.public ReadableByteChannel openChannelForRead()
InputStream returned from
openForRead.
openChannelForRead in interface ReadableFileReadableFile.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 ReadableFileReadableFile.getSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||