Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » environment » [javadoc | source]
org.apache.cocoon.environment
public interface: WriteableSource [javadoc | source]

All Implemented Interfaces:
    ModifiableSource

All Known Implementing Classes:
    AbstractStreamWriteableSource, FileSource

Deprecated! Use - the org.apache.excalibur.source.ModifiableSource interface instead

A Source that can be written to. It provides two methods that allow for SAX-based and byte-based output.

Callers will use the most appropriate method for their use and it's up to the implementation to handle both sources. For example, an XML-based implementation can use a parser to convert bytes written to the OutputStream to SAX events, and a byte-based implementation (such as file), can use a serializer to convert SAX events to a byte stream.

Method from org.apache.cocoon.environment.WriteableSource Summary:
canCancel,   canCancel,   cancel,   cancel,   exists,   getContentHandler,   getOutputStream
Method from org.apache.cocoon.environment.WriteableSource Detail:
 public boolean canCancel(ContentHandler handler)       Deprecated!
 public boolean canCancel(OutputStream stream)       Deprecated!
 public  void cancel(ContentHandler handler) throws Exception       Deprecated!
    Cancel the data sent to a ContentHandler returned by #getContentHandler() .

    After cancel, the handler should no more be used.

 public  void cancel(OutputStream stream) throws Exception       Deprecated!
    Cancel the data sent to an OutputStream returned by #getOutputStream() .

    After cancel, the stream should no more be used.

 public boolean exists()       Deprecated!
    Does this source actually exist ?
 public ContentHandler getContentHandler() throws SAXException, ProcessingException       Deprecated!
    Get a ContentHandler where an XML document can be written using SAX events.

    Care should be taken that the returned handler can actually be a org.apache.cocoon.xml.XMLConsumer supporting also lexical events such as comments.

 public OutputStream getOutputStream() throws IOException, ProcessingException       Deprecated!
    Get an InputStream where raw bytes can be written to. The signification of these bytes is implementation-dependent and is not restricted to a serialized XML document.