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