public class StreamAwareContentWriterProxy extends AbstractStreamAwareProxy implements ContentWriter
ContentWriter which captures OutputStream or WritableByteChannel to introduce a possibility of releasing captured resourceContentWriter,
AbstractStreamAwareProxy| Constructor and Description |
|---|
StreamAwareContentWriterProxy(ContentWriter delegator) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ContentStreamListener listener) |
boolean |
canBeClosed() |
ContentData |
getContentData() |
OutputStream |
getContentOutputStream() |
String |
getContentUrl() |
String |
getEncoding() |
FileChannel |
getFileChannel(boolean truncate) |
Locale |
getLocale() |
String |
getMimetype() |
ContentReader |
getReader() |
long |
getSize() |
Closeable |
getStream() |
WritableByteChannel |
getWritableChannel() |
void |
guessEncoding() |
void |
guessMimetype(String filename) |
boolean |
isChannelOpen() |
boolean |
isClosed() |
void |
putContent(ContentReader reader) |
void |
putContent(File file) |
void |
putContent(InputStream is) |
void |
putContent(String content) |
void |
setEncoding(String encoding) |
void |
setLocale(Locale locale) |
void |
setMimetype(String mimetype) |
releasepublic StreamAwareContentWriterProxy(ContentWriter delegator)
public OutputStream getContentOutputStream() throws ContentIOException
getContentOutputStream in interface ContentWriterContentIOExceptionpublic FileChannel getFileChannel(boolean truncate) throws ContentIOException
getFileChannel in interface ContentWriterContentIOExceptionpublic ContentReader getReader() throws ContentIOException
getReader in interface ContentWriterContentIOExceptionpublic WritableByteChannel getWritableChannel() throws ContentIOException
getWritableChannel in interface ContentWriterContentIOExceptionpublic void guessEncoding()
guessEncoding in interface ContentWriterpublic void guessMimetype(String filename)
guessMimetype in interface ContentWriterpublic boolean isClosed()
isClosed in interface ContentWriterpublic void putContent(ContentReader reader) throws ContentIOException
putContent in interface ContentWriterContentIOExceptionpublic void putContent(InputStream is) throws ContentIOException
putContent in interface ContentWriterContentIOExceptionpublic void putContent(File file) throws ContentIOException
putContent in interface ContentWriterContentIOExceptionpublic void putContent(String content) throws ContentIOException
putContent in interface ContentWriterContentIOExceptionpublic 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–2020 Alfresco Software. All rights reserved.