|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 Summary | |
boolean |
canCancel(org.xml.sax.ContentHandler handler)
Can the data sent to a ContentHandler returned by
getContentHandler() be cancelled ? |
boolean |
canCancel(java.io.OutputStream stream)
Can the data sent to an OutputStream returned by
getOutputStream() be cancelled ? |
void |
cancel(org.xml.sax.ContentHandler handler)
Cancel the data sent to a ContentHandler returned by
getContentHandler() .
|
void |
cancel(java.io.OutputStream stream)
Cancel the data sent to an OutputStream returned by
getOutputStream() .
|
boolean |
exists()
Does this source actually exist ? |
org.xml.sax.ContentHandler |
getContentHandler()
Get a ContentHandler where an XML document can
be written using SAX events.
|
java.io.OutputStream |
getOutputStream()
Get an InputStream where raw bytes can be written to.
|
Methods inherited from interface org.apache.cocoon.environment.ModifiableSource |
refresh |
Methods inherited from interface org.apache.cocoon.environment.Source |
getContentLength, getInputSource, getInputStream, getLastModified, getSystemId |
Methods inherited from interface org.apache.avalon.excalibur.pool.Recyclable |
recycle |
Methods inherited from interface org.apache.cocoon.xml.XMLizable |
toSAX |
Method Detail |
public boolean exists()
public org.xml.sax.ContentHandler getContentHandler() throws org.xml.sax.SAXException, ProcessingException
ContentHandler
where an XML document can
be written using SAX events.
Care should be taken that the returned handler can actually
be a XMLConsumer
supporting also
lexical events such as comments.
public java.io.OutputStream getOutputStream() throws java.io.IOException, ProcessingException
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.public boolean canCancel(org.xml.sax.ContentHandler handler)
ContentHandler
returned by
getContentHandler()
be cancelled ?public boolean canCancel(java.io.OutputStream stream)
OutputStream
returned by
getOutputStream()
be cancelled ?public void cancel(org.xml.sax.ContentHandler handler) throws java.lang.Exception
ContentHandler
returned by
getContentHandler()
.
After cancel, the handler should no more be used.
public void cancel(java.io.OutputStream stream) throws java.lang.Exception
OutputStream
returned by
getOutputStream()
.
After cancel, the stream should no more be used.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |