public abstract class StaxUtils extends ObjectSE
特に、StAX(javax.xml.stream)を TrAX API(javax.xml.transform)と組み合わせて使用し、StAX リーダー / ライターを SAX リーダー / ハンドラーに、またはその逆に変換するためのメソッド。
| コンストラクターと説明 |
|---|
StaxUtils() |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic static XMLInputFactorySE createDefensiveInputFactory()
XMLInputFactorySE を作成します。つまり、DTD と外部エンティティの解決はサポートされません。public static <T extends XMLInputFactorySE> T createDefensiveInputFactory(SupplierSE<T> instanceSupplier)
createDefensiveInputFactory() のバリアント。instanceSupplier - 入力ファクトリインスタンスのサプライヤー public static SourceSE createStaxSource(XMLStreamReaderSE streamReader)
XMLStreamReaderSE の JAXP 1.4 StAXSourceSE を作成します。streamReader - StAX ストリームリーダー streamReader をラップするソース public static SourceSE createStaxSource(XMLEventReaderSE eventReader) throws XMLStreamExceptionSE
XMLEventReaderSE の JAXP 1.4 StAXSourceSE を作成します。eventReader - StAX イベントリーダー eventReader をラップするソース XMLStreamExceptionSEpublic static SourceSE createCustomStaxSource(XMLStreamReaderSE streamReader)
XMLStreamReaderSE のカスタム非 JAXP 1.4 StAX SourceSE を作成します。streamReader - StAX ストリームリーダー streamReader をラップするソース public static SourceSE createCustomStaxSource(XMLEventReaderSE eventReader)
XMLEventReaderSE のカスタム非 JAXP 1.4 StAX SourceSE を作成します。eventReader - StAX イベントリーダー eventReader をラップするソース public static boolean isStaxSource(SourceSE source)
SourceSE が JAXP 1.4 StAX ソースであるか、カスタム StAX ソースであるかを示します。source が JAXP 1.4 StAXSourceSE またはカスタム StAX ソースの場合は true。それ以外の場合は false @Nullable public static XMLStreamReaderSE getXMLStreamReader(SourceSE source)
XMLStreamReaderSE を返します。source - JAXP 1.4 StAXSourceSEXMLStreamReaderSEIllegalArgumentExceptionSE - source が JAXP 1.4 StAXSourceSE またはカスタム StAX ソースではない場合 @Nullable public static XMLEventReaderSE getXMLEventReader(SourceSE source)
XMLEventReaderSE を返します。source - JAXP 1.4 StAXSourceSEXMLEventReaderSEIllegalArgumentExceptionSE - source が JAXP 1.4 StAXSourceSE またはカスタム StAX ソースではない場合 public static ResultSE createStaxResult(XMLStreamWriterSE streamWriter)
XMLStreamWriterSE の JAXP 1.4 StAXResultSE を作成します。streamWriter - StAX ストリームライター streamWriter をラップする結果 public static ResultSE createStaxResult(XMLEventWriterSE eventWriter)
XMLEventWriterSE の JAXP 1.4 StAXResultSE を作成します。eventWriter - StAX イベントライター streamReader をラップする結果 public static ResultSE createCustomStaxResult(XMLStreamWriterSE streamWriter)
XMLStreamWriterSE のカスタム非 JAXP 1.4 StAX ResultSE を作成します。streamWriter - StAX ストリームライター streamWriter をラップするソース public static ResultSE createCustomStaxResult(XMLEventWriterSE eventWriter)
XMLEventWriterSE のカスタム非 JAXP 1.4 StAX ResultSE を作成します。eventWriter - StAX イベントライター eventWriter をラップするソース public static boolean isStaxResult(ResultSE result)
ResultSE が JAXP 1.4 StAX Result であるか、カスタム StAX Result であるかを示します。result が JAXP 1.4 StAXResultSE またはカスタム StAX 結果の場合は true。それ以外の場合は false @Nullable public static XMLStreamWriterSE getXMLStreamWriter(ResultSE result)
XMLStreamWriterSE を返します。result - JAXP 1.4 StAXResultSEXMLStreamReaderSEIllegalArgumentExceptionSE - source が JAXP 1.4 StAXResultSE またはカスタム StAX 結果ではない場合 @Nullable public static XMLEventWriterSE getXMLEventWriter(ResultSE result)
XMLEventWriterSE を返します。result - JAXP 1.4 StAXResultSEXMLStreamReaderSEIllegalArgumentExceptionSE - source が JAXP 1.4 StAXResultSE またはカスタム StAX 結果ではない場合 public static XMLEventReaderSE createXMLEventReader(ListSE<XMLEventSE> events)
XMLEventSE のリストから XMLEventReaderSE を作成します。events - XMLEventsSE のリスト。XMLEventReader public static ContentHandlerSE createContentHandler(XMLStreamWriterSE streamWriter)
XMLStreamWriterSE に書き込む SAX ContentHandlerSE を作成します。streamWriter - StAX ストリームライター streamWriter に書き込むコンテンツハンドラー public static ContentHandlerSE createContentHandler(XMLEventWriterSE eventWriter)
XMLEventWriterSE にイベントを書き込む SAX ContentHandlerSE を作成します。eventWriter - StAX イベントライター eventWriter に書き込むコンテンツハンドラー public static XMLReaderSE createXMLReader(XMLStreamReaderSE streamReader)
XMLStreamReaderSE から読み取る SAX XMLReaderSE を作成します。streamReader - StAX ストリームリーダー streamWriter から読み取る XMLReader public static XMLReaderSE createXMLReader(XMLEventReaderSE eventReader)
XMLEventReaderSE から読み取る SAX XMLReaderSE を作成します。eventReader - StAX イベントリーダー eventWriter から読み取る XMLReader public static XMLStreamReaderSE createEventStreamReader(XMLEventReaderSE eventReader) throws XMLStreamExceptionSE
XMLEventReaderSE から読み取る XMLStreamReaderSE を返します。StAX XMLInputFactory ではストリームリーダーからイベントリーダーを作成できますが、その逆はできないため便利です。XMLStreamExceptionSEpublic static XMLStreamWriterSE createEventStreamWriter(XMLEventWriterSE eventWriter)
XMLEventWriterSE に書き込む XMLStreamWriterSE を返します。public static XMLStreamWriterSE createEventStreamWriter(XMLEventWriterSE eventWriter, XMLEventFactorySE eventFactory)
XMLEventWriterSE に書き込む XMLStreamWriterSE を返します。