|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.xml.transform.TraxUtils
public abstract class TraxUtils
Convenient utility methods for dealing with TrAX.
| Nested Class Summary | |
|---|---|
static interface |
TraxUtils.ResultCallback
Callback interface invoked on each sort of Result. |
static interface |
TraxUtils.SourceCallback
Callback interface invoked on each sort of Source. |
| Constructor Summary | |
|---|---|
TraxUtils()
|
|
| Method Summary | |
|---|---|
static Source |
createStaxSource(XMLEventReader eventReader)
Creates a StAX Source for the given XMLEventReader. |
static Source |
createStaxSource(XMLStreamReader streamReader)
Creates a StAX Source for the given XMLStreamReader. |
static void |
doWithResult(Result result,
TraxUtils.ResultCallback callback)
Performs the given callback operation on a Result. |
static void |
doWithSource(Source source,
TraxUtils.SourceCallback callback)
Performs the given callback operation on a Source. |
static Document |
getDocument(DOMSource source)
Returns the Document of the given DOMSource. |
static XMLEventReader |
getXMLEventReader(Source source)
Returns the XMLEventReader for the given StAX Source. |
static XMLEventWriter |
getXMLEventWriter(Result result)
Returns the XMLEventWriter for the given StAX Result. |
static XMLStreamReader |
getXMLStreamReader(Source source)
Returns the XMLStreamReader for the given StAX Source. |
static XMLStreamWriter |
getXMLStreamWriter(Result result)
Returns the XMLStreamWriter for the given StAX Result. |
static boolean |
isStaxResult(Result result)
Indicates whether the given Result is a StAX Result. |
static boolean |
isStaxSource(Source source)
Indicates whether the given Source is a StAX Source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TraxUtils()
| Method Detail |
|---|
public static boolean isStaxSource(Source source)
Source is a StAX Source.
true if source is a Spring-WS StaxSource or JAXP 1.4 StAXSource; false otherwise.public static boolean isStaxResult(Result result)
Result is a StAX Result.
true if result is a Spring-WS StaxResult or JAXP 1.4 StAXResult; false otherwise.public static XMLStreamReader getXMLStreamReader(Source source)
XMLStreamReader for the given StAX Source.
source - a Spring-WS StaxSource or StAXSource
XMLStreamReader
IllegalArgumentException - if source is neither a Spring-WS StaxSource or StAXSourcepublic static XMLEventReader getXMLEventReader(Source source)
XMLEventReader for the given StAX Source.
source - a Spring-WS StaxSource or StAXSource
XMLEventReader
IllegalArgumentException - if source is neither a Spring-WS StaxSource or StAXSourcepublic static XMLStreamWriter getXMLStreamWriter(Result result)
XMLStreamWriter for the given StAX Result.
result - a Spring-WS StaxResult or StAXResult
XMLStreamReader
IllegalArgumentException - if source is neither a Spring-WS StaxResult or StAXResultpublic static XMLEventWriter getXMLEventWriter(Result result)
XMLEventWriter for the given StAX Result.
result - a Spring-WS StaxResult or StAXResult
XMLStreamReader
IllegalArgumentException - if source is neither a Spring-WS StaxResult or StAXResultpublic static Source createStaxSource(XMLStreamReader streamReader)
Source for the given XMLStreamReader. Returns a StAXSource under JAXP 1.4
or higher, or a StaxSource otherwise.
streamReader - the StAX stream reader
streamReader
public static Source createStaxSource(XMLEventReader eventReader)
throws XMLStreamException
Source for the given XMLEventReader. Returns a StAXSource under JAXP 1.4
or higher, or a StaxSource otherwise.
eventReader - the StAX event reader
streamReader
XMLStreamException - in case of StAX errorspublic static Document getDocument(DOMSource source)
Document of the given DOMSource.
source - the DOM source
public static void doWithSource(Source source,
TraxUtils.SourceCallback callback)
throws XMLStreamException,
IOException,
SAXException
Source. Supports both the JAXP 1.4
StAXSource and the Spring-WS StaxSource.
source - source to look atcallback - the callback to invoke for each kind of source
XMLStreamException
IOException
SAXException
public static void doWithResult(Result result,
TraxUtils.ResultCallback callback)
throws XMLStreamException,
IOException,
SAXException
Result. Supports both the JAXP 1.4
StAXResult and the Spring-WS StaxResult.
result - result to look atcallback - the callback to invoke for each kind of result
XMLStreamException
IOException
SAXException
|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||