public class EmptyContentReader extends AbstractContentReader
exists()
always returns false.AbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise
Constructor and Description |
---|
EmptyContentReader(String contentUrl) |
Modifier and Type | Method and Description |
---|---|
protected org.alfresco.service.cmr.repository.ContentReader |
createReader()
A factory method for subclasses to implement that will ensure the proper
implementation of the
ContentReader.getReader() method. |
boolean |
exists() |
protected ReadableByteChannel |
getDirectReadableChannel()
Provides low-level access to read content from the repository.
|
long |
getLastModified() |
long |
getSize() |
addListener, compareContentReaders, getContent, getContent, getContentInputStream, getContentString, getContentString, getFileChannel, getLimits, getReadableChannel, getReader, getTransformerDebug, getUseBufferedInputStream, isChannelOpen, isClosed, setLimits, setTransformerDebug, setUseBufferedInputStream
channelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetype, toString
public EmptyContentReader(String contentUrl)
contentUrl
- the content URLprotected org.alfresco.service.cmr.repository.ContentReader createReader() throws org.alfresco.service.cmr.repository.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
org.alfresco.service.cmr.repository.ContentIOException
protected ReadableByteChannel getDirectReadableChannel() throws org.alfresco.service.cmr.repository.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
org.alfresco.service.cmr.repository.ContentIOException
- if the channel could not be opened or the underlying content
has disappearedpublic boolean exists()
public long getLastModified()
public long getSize()
Copyright © 2005–2017 Alfresco Software. All rights reserved.