Class ContentCacheImpl.CacheWriter
java.lang.Object
org.alfresco.repo.content.AbstractContentAccessor
org.alfresco.repo.content.AbstractContentWriter
org.alfresco.repo.content.filestore.FileContentWriter
org.alfresco.repo.content.caching.ContentCacheImpl.CacheWriter
- All Implemented Interfaces:
ContentAccessor,ContentWriter,MimetypeServiceAware
- Enclosing class:
- ContentCacheImpl
This FileContentWriter subclass allows for the temp cache file
to be renamed to a cache file proper, e.g filename.tmp becomes
filename.bin
- Author:
- Matt Ward
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.repo.content.AbstractContentAccessor
AbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentReaderThe URL of the write is known from the start and this method contract states that no consideration needs to be taken w.r.t.getFile()longgetSize()voidsetCacheFile(File file) Methods inherited from class org.alfresco.repo.content.filestore.FileContentWriter
canWrite, getDirectWritableChannelMethods inherited from class org.alfresco.repo.content.AbstractContentWriter
addListener, getContentLimitProvider, getContentOutputStream, getExistingContentReader, getFileChannel, getReader, getWritableChannel, guessEncoding, guessMimetype, isChannelOpen, isClosed, putContent, putContent, putContent, putContent, setContentLimitProvider, setMimetypeServiceMethods inherited from class org.alfresco.repo.content.AbstractContentAccessor
channelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetype, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.service.cmr.repository.ContentAccessor
getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setEncoding, setLocale, setMimetype
-
Constructor Details
-
CacheWriter
-
-
Method Details
-
setCacheFile
-
getFile
- Overrides:
getFilein classFileContentWriter- Returns:
- Returns the file that this writer accesses
-
createReader
Description copied from class:FileContentWriterThe URL of the write is known from the start and this method contract states that no consideration needs to be taken w.r.t. the stream state.- Overrides:
createReaderin classFileContentWriter- Returns:
- Returns a reader onto the location referenced by this instance. The instance must always be a new instance and never null.
- Throws:
ContentIOException
-
getSize
public long getSize()- Specified by:
getSizein interfaceContentAccessor- Overrides:
getSizein classFileContentWriter- Returns:
- Returns the size of the underlying file or
-