org.apache.cocoon.components.source
Class AbstractStreamWriteableSource
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.source.AbstractStreamSource
org.apache.cocoon.components.source.AbstractStreamWriteableSource
- All Implemented Interfaces:
- Poolable, Recyclable, LogEnabled, ModifiableSource, Source, WriteableSource, XMLizable
- Direct Known Subclasses:
- FileSource
Deprecated. Use the new Avalon Excalibur Source Resolving
public abstract class AbstractStreamWriteableSource
- extends AbstractStreamSource
- implements WriteableSource
This abstract class provides convenience methods to implement
a stream based org.apache.cocoon.environment.WriteableSource
.
Implement getOutputStream() to obtain a valid implementation.
This base implementation creates a ContentHandler
by using
the sitemap 'xml' serializer to write SAX events to the stream returned by
getOutputStream()
.
- Version:
- CVS $Id: AbstractStreamWriteableSource.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Sylvain Wallez
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable |
toSAX |
AbstractStreamWriteableSource
protected AbstractStreamWriteableSource(ComponentManager manager)
- Deprecated.
canCancel
public boolean canCancel(ContentHandler handler)
- Deprecated.
- Checks if the
OutputStream
under handler
can be cancelled.
- Specified by:
canCancel
in interface WriteableSource
- Returns:
- true if the handler can be cancelled
- See Also:
canCancel(OutputStream)
canCancel
public boolean canCancel(OutputStream stream)
- Deprecated.
- Always return
false
. To be redefined by implementations that support
cancel()
.
- Specified by:
canCancel
in interface WriteableSource
- Returns:
- true if the stream can be cancelled
cancel
public void cancel(ContentHandler handler)
throws Exception
- Deprecated.
- Cancels the
OutputStream
under handler
.
- Specified by:
cancel
in interface WriteableSource
- Throws:
Exception
- See Also:
cancel(OutputStream)
cancel
public void cancel(OutputStream stream)
throws Exception
- Deprecated.
- Always throw
UnsupportedOperationException
. To be redefined by
implementations that support cancel()
.
- Specified by:
cancel
in interface WriteableSource
- Throws:
Exception
getContentHandler
public ContentHandler getContentHandler()
throws SAXException,
ProcessingException
- Deprecated.
- Get a
ContentHandler
to write a SAX stream to this source. It
uses either the 'xml' or 'html' serializer depending on the result of
AbstractStreamSource.isHTMLContent()
to serialize events, and thus these serializers must
exist in this source's component manager.
- Specified by:
getContentHandler
in interface WriteableSource
- Returns:
- a handler for SAX events
- Throws:
SAXException
ProcessingException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.