public class StreamAwareContentReaderProxy extends AbstractStreamAwareProxy implements org.alfresco.service.cmr.repository.ContentReader
ContentReader
which captures InputStream
or ReadableByteChannel
to introduce a possibility releasing captured resourceContentReader
,
AbstractStreamAwareProxy
Constructor and Description |
---|
StreamAwareContentReaderProxy(org.alfresco.service.cmr.repository.ContentReader delegator) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(org.alfresco.service.cmr.repository.ContentStreamListener listener) |
boolean |
canBeClosed() |
boolean |
exists() |
void |
getContent(File file) |
void |
getContent(OutputStream os) |
org.alfresco.service.cmr.repository.ContentData |
getContentData() |
InputStream |
getContentInputStream() |
String |
getContentString() |
String |
getContentString(int length) |
String |
getContentUrl() |
String |
getEncoding() |
FileChannel |
getFileChannel() |
long |
getLastModified() |
Locale |
getLocale() |
String |
getMimetype() |
ReadableByteChannel |
getReadableChannel() |
org.alfresco.service.cmr.repository.ContentReader |
getReader() |
long |
getSize() |
Closeable |
getStream() |
boolean |
isChannelOpen() |
boolean |
isClosed() |
void |
setEncoding(String encoding) |
void |
setLocale(Locale locale) |
void |
setMimetype(String mimetype) |
release
public StreamAwareContentReaderProxy(org.alfresco.service.cmr.repository.ContentReader delegator)
public boolean exists()
exists
in interface org.alfresco.service.cmr.repository.ContentReader
public void getContent(OutputStream os) throws org.alfresco.service.cmr.repository.ContentIOException
getContent
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public void getContent(File file) throws org.alfresco.service.cmr.repository.ContentIOException
getContent
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public InputStream getContentInputStream() throws org.alfresco.service.cmr.repository.ContentIOException
getContentInputStream
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public String getContentString() throws org.alfresco.service.cmr.repository.ContentIOException
getContentString
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public String getContentString(int length) throws org.alfresco.service.cmr.repository.ContentIOException
getContentString
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public FileChannel getFileChannel() throws org.alfresco.service.cmr.repository.ContentIOException
getFileChannel
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public long getLastModified()
getLastModified
in interface org.alfresco.service.cmr.repository.ContentReader
public ReadableByteChannel getReadableChannel() throws org.alfresco.service.cmr.repository.ContentIOException
getReadableChannel
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public org.alfresco.service.cmr.repository.ContentReader getReader() throws org.alfresco.service.cmr.repository.ContentIOException
getReader
in interface org.alfresco.service.cmr.repository.ContentReader
org.alfresco.service.cmr.repository.ContentIOException
public boolean isClosed()
isClosed
in interface org.alfresco.service.cmr.repository.ContentReader
public void addListener(org.alfresco.service.cmr.repository.ContentStreamListener listener)
addListener
in interface org.alfresco.service.cmr.repository.ContentAccessor
public org.alfresco.service.cmr.repository.ContentData getContentData()
getContentData
in interface org.alfresco.service.cmr.repository.ContentAccessor
public String getContentUrl()
getContentUrl
in interface org.alfresco.service.cmr.repository.ContentAccessor
public String getEncoding()
getEncoding
in interface org.alfresco.service.cmr.repository.ContentAccessor
public Locale getLocale()
getLocale
in interface org.alfresco.service.cmr.repository.ContentAccessor
public String getMimetype()
getMimetype
in interface org.alfresco.service.cmr.repository.ContentAccessor
public long getSize()
getSize
in interface org.alfresco.service.cmr.repository.ContentAccessor
public boolean isChannelOpen()
isChannelOpen
in interface org.alfresco.service.cmr.repository.ContentAccessor
public void setEncoding(String encoding)
setEncoding
in interface org.alfresco.service.cmr.repository.ContentAccessor
public void setLocale(Locale locale)
setLocale
in interface org.alfresco.service.cmr.repository.ContentAccessor
public void setMimetype(String mimetype)
setMimetype
in interface org.alfresco.service.cmr.repository.ContentAccessor
public boolean canBeClosed()
canBeClosed
in class AbstractStreamAwareProxy
Boolean
value which determines whether stream can (true
) or cannot ((false
)) be closedpublic Closeable getStream()
getStream
in class AbstractStreamAwareProxy
Closeable
instance which represents channel or stream which uses channelCopyright © 2005–2017 Alfresco Software. All rights reserved.