|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.sax.util.XMLUtils
public abstract class XMLUtils
Utilities for the usage of an XMLReader
together with a SAXConsumer
.
Field Summary | |
---|---|
static Attributes |
EMPTY_ATTRIBUTES
Empty attributes immutable object. |
Constructor Summary | |
---|---|
XMLUtils()
|
Method Summary | |
---|---|
static XMLReader |
createXMLReader(ContentHandler contentHandler)
|
static void |
toOutputStream(OutputStream outputStream,
org.apache.cocoon.xml.sax.SAXBuffer saxBuffer)
Serialize the content of a SAXBuffer into an OutputStream . |
static void |
toSax(InputStream inputStream,
ContentHandler contentHandler)
Use a SAX parser and read the content of an InputStream into an SAXConsumer . |
static void |
toSax(String string,
ContentHandler contentHandler)
Use a SAX parser and read the content of an InputStream into an SAXConsumer . |
static void |
toSax(URLConnection urlConnection,
ContentHandler contentHandler)
Stream a URLConnection into an SAXConsumer by using
toSax(InputStream, ContentHandler) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Attributes EMPTY_ATTRIBUTES
Constructor Detail |
---|
public XMLUtils()
Method Detail |
---|
public static void toOutputStream(OutputStream outputStream, org.apache.cocoon.xml.sax.SAXBuffer saxBuffer)
SAXBuffer
into an OutputStream
.
outputStream
- OutputStream to use.saxBuffer
- A SaxBuffer containing the SAX events.public static void toSax(InputStream inputStream, ContentHandler contentHandler) throws IOException, SAXException
InputStream
into an SAXConsumer
.
inputStream
- InputStream containing the content to be parsed.contentHandler
- The ContentHandler to use.
IOException
- if the InputStream
can't be used.
SAXException
- if the InputStream
can't be parsed.public static void toSax(String string, ContentHandler contentHandler) throws IOException, SAXException
InputStream
into an SAXConsumer
.
string
- A String to be parsed.contentHandler
- The ContentHandler to use.
IOException
- if the InputStream
can't be used.
SAXException
- if the InputStream
can't be parsed.public static void toSax(URLConnection urlConnection, ContentHandler contentHandler)
URLConnection
into an SAXConsumer
by using
toSax(InputStream, ContentHandler)
. The URLConnection
is closed after
streaming.
urlConnection
- The URLConnection
to be streamed.contentHandler
- An ContentHandler
as target.public static XMLReader createXMLReader(ContentHandler contentHandler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |