|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.AbstractContentAccessor
org.alfresco.repo.content.AbstractContentReader
org.alfresco.repo.content.EmptyContentReader
public class EmptyContentReader
A blank reader for which exists()
always returns false.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.alfresco.repo.content.AbstractContentAccessor |
---|
AbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise |
Constructor Summary | |
---|---|
EmptyContentReader(java.lang.String contentUrl)
|
Method Summary | |
---|---|
protected ContentReader |
createReader()
A factory method for subclasses to implement that will ensure the proper implementation of the ContentReader.getReader() method. |
boolean |
exists()
Check if the underlying content is present. |
protected java.nio.channels.ReadableByteChannel |
getDirectReadableChannel()
Provides low-level access to read content from the repository. |
long |
getLastModified()
Gets the time of the last modification of the underlying content. |
long |
getSize()
Gets the size of the content that this reader references. |
Methods inherited from class org.alfresco.repo.content.AbstractContentReader |
---|
addListener, compareContentReaders, getContent, getContent, getContentInputStream, getContentString, getContentString, getFileChannel, getReadableChannel, getReader, isChannelOpen, isClosed |
Methods inherited from class org.alfresco.repo.content.AbstractContentAccessor |
---|
channelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetype, setRetryingTransactionHelper, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.alfresco.service.cmr.repository.ContentAccessor |
---|
getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setEncoding, setLocale, setMimetype, setRetryingTransactionHelper |
Constructor Detail |
---|
public EmptyContentReader(java.lang.String contentUrl)
contentUrl
- the content URLMethod Detail |
---|
protected ContentReader createReader() throws ContentIOException
AbstractContentReader
ContentReader.getReader()
method.
Only the instance need be constructed. The required mimetype, encoding, etc will be copied across by this class.
createReader
in class AbstractContentReader
ContentIOException
protected java.nio.channels.ReadableByteChannel getDirectReadableChannel() throws ContentIOException
AbstractContentReader
This is the only of the content reading methods that needs to be implemented by derived classes. All other content access methods make use of this in their underlying implementations.
getDirectReadableChannel
in class AbstractContentReader
ContentIOException
- if the channel could not be opened or the underlying content
has disappearedpublic boolean exists()
ContentReader
underlying content
is present.
public long getLastModified()
ContentReader
0L
if the content doesn't exist
.System.currentTimeMillis()
public long getSize()
ContentAccessor
OL
if the
content doesn't exist
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |