|
This class does not provide remote access to the file.
Nested classes/interfaces inherited from class org.alfresco.repo.content.AbstractContentAccessor |
AbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise |
Field Summary | ||
static String |
MSG_MISSING_CONTENT message key for missing content. |
Constructor Summary | ||
FileContentReader(File file) Constructor that builds a URL based on the absolute path of the file. |
||
FileContentReader(File file, String url) Constructor that explicitely sets the URL that the reader represents. |
Method Summary | ||
boolean |
canWrite() Deprecated. Since 5.1. This method has no value: a file reader can never write (DH: 2015/02/17) |
|
protected ContentReader |
createReader() The URL of the write is known from the start and this method contract states that no consideration needs to be taken w.r.t. |
|
boolean |
exists() Check if the underlying content is present. |
|
protected ReadableByteChannel |
getDirectReadableChannel() Provides low-level access to read content from the repository. |
|
getFile() | ||
long |
getLastModified() Gets the time of the last modification of the underlying content. |
|
static ContentReader |
getSafeContentReader(ContentReader existingReader, String msgTemplate, Object... args) Checks the existing reader provided and replaces it with a reader onto some fake content if required. |
|
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, getLimits, getReadableChannel, getReader, getTransformerDebug, getUseBufferedInputStream, isChannelOpen, isClosed, setLimits, setTransformerDebug, setUseBufferedInputStream |
Methods inherited from class org.alfresco.repo.content.AbstractContentAccessor |
channelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetype, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
It is a convenience method that clients can use to cheaply get a reader that is valid, regardless of whether the initial reader is valid.
OL
if the
content doesn't exist.0L
if the content doesn't exist.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.
|