本文整理汇总了Java中com.thoughtworks.xstream.io.xml.StaxReader类的典型用法代码示例。如果您正苦于以下问题:Java StaxReader类的具体用法?Java StaxReader怎么用?Java StaxReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StaxReader类属于com.thoughtworks.xstream.io.xml包,在下文中一共展示了StaxReader类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createReader
import com.thoughtworks.xstream.io.xml.StaxReader; //导入依赖的package包/类
@Override
public HierarchicalStreamReader createReader(final Reader reader) {
try {
return new StaxReader(new QNameMap(), mif.createXMLStreamReader(reader), getNameCoder());
} catch (final XMLStreamException e) {
throw new StreamException(e);
}
}
示例2: createHierarchicalStreamReader
import com.thoughtworks.xstream.io.xml.StaxReader; //导入依赖的package包/类
protected HierarchicalStreamReader createHierarchicalStreamReader(Exchange exchange, InputStream stream) throws XMLStreamException {
updateCharactorEncodingInfo(exchange);
if (getXstreamDriver() != null) {
return getXstreamDriver().createReader(stream);
}
XMLStreamReader xmlReader = getStaxConverter().createXMLStreamReader(stream, exchange);
return new StaxReader(new QNameMap(), xmlReader);
}
示例3: createReader
import com.thoughtworks.xstream.io.xml.StaxReader; //导入依赖的package包/类
public HierarchicalStreamReader createReader(File paramFile)
{
FileInputStream localFileInputStream = null;
try
{
localFileInputStream = new FileInputStream(paramFile);
StaxReader localStaxReader = new StaxReader(new QNameMap(), this.mif.createXMLStreamReader(paramFile.toURI().toASCIIString(), localFileInputStream), getNameCoder());
try
{
localFileInputStream.close();
}
catch (IOException localIOException2)
{
}
return localStaxReader;
}
catch (XMLStreamException localXMLStreamException)
{
throw new StreamException(localXMLStreamException);
}
catch (IOException localIOException1)
{
throw new StreamException(localIOException1);
}
finally
{
if (localFileInputStream != null);
try
{
localFileInputStream.close();
}
catch (IOException localIOException3)
{
}
}
}
示例4: unmarshalXmlStreamReader
import com.thoughtworks.xstream.io.xml.StaxReader; //导入依赖的package包/类
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
return doUnmarshal(new StaxReader(new QNameMap(), streamReader, this.nameCoder), null);
}
示例5: createHierarchicalStreamReader
import com.thoughtworks.xstream.io.xml.StaxReader; //导入依赖的package包/类
protected HierarchicalStreamReader createHierarchicalStreamReader(Exchange exchange, InputStream stream) throws XMLStreamException {
return new StaxReader(new QNameMap(), mif.createXMLStreamReader(stream));
}
示例6: unmarshalXmlStreamReader
import com.thoughtworks.xstream.io.xml.StaxReader; //导入依赖的package包/类
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
return unmarshal(new StaxReader(new QNameMap(), streamReader));
}