com.thoughtworks.xstream.io.xml.QNameMap Java Examples

The following examples show how to use com.thoughtworks.xstream.io.xml.QNameMap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XStreamMarshaller.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Override
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
	try {
		doMarshal(graph, new StaxWriter(new QNameMap(), streamWriter, this.nameCoder), null);
	}
	catch (XMLStreamException ex) {
		throw convertXStreamException(ex, true);
	}
}
 
Example #2
Source File: XStreamMarshaller.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Override
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
	try {
		doMarshal(graph, new StaxWriter(new QNameMap(), streamWriter, this.nameCoder), null);
	}
	catch (XMLStreamException ex) {
		throw convertXStreamException(ex, true);
	}
}
 
Example #3
Source File: JettisonStaxWriter.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @since 1.4
 */
public JettisonStaxWriter(
    QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument,
    boolean namespaceRepairingMode, NameCoder nameCoder,
    MappedNamespaceConvention convention) throws XMLStreamException {
    super(qnameMap, out, writeEnclosingDocument, namespaceRepairingMode, nameCoder);
    this.convention = convention;
}
 
Example #4
Source File: JettisonStaxWriter.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @deprecated As of 1.4 use
 *             {@link JettisonStaxWriter#JettisonStaxWriter(QNameMap, XMLStreamWriter, boolean, boolean, NameCoder, MappedNamespaceConvention)}
 *             instead
 */
public JettisonStaxWriter(
    QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument,
    boolean namespaceRepairingMode, XmlFriendlyReplacer replacer,
    MappedNamespaceConvention convention) throws XMLStreamException {
    this(qnameMap, out, writeEnclosingDocument, namespaceRepairingMode, (NameCoder) replacer, convention);
}
 
Example #5
Source File: JettisonStaxWriter.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public JettisonStaxWriter(
    QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument,
    boolean namespaceRepairingMode, MappedNamespaceConvention convention)
    throws XMLStreamException {
    super(qnameMap, out, writeEnclosingDocument, namespaceRepairingMode);
    this.convention = convention;
}
 
Example #6
Source File: JettisonStaxWriter.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @since 1.4
 */
public JettisonStaxWriter(
    QNameMap qnameMap, XMLStreamWriter out, NameCoder nameCoder, MappedNamespaceConvention convention)
    throws XMLStreamException {
    super(qnameMap, out, nameCoder);
    this.convention = convention;
}
 
Example #7
Source File: JettisonMappedXmlDriver.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public HierarchicalStreamReader createReader(final Reader reader) {
    try {
        return new StaxReader(new QNameMap(), mif.createXMLStreamReader(reader), getNameCoder());
    } catch (final XMLStreamException e) {
        throw new StreamException(e);
    }
}
 
Example #8
Source File: JettisonMappedXmlDriver.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public HierarchicalStreamReader createReader(final InputStream input) {
    try {
        return new StaxReader(new QNameMap(), mif.createXMLStreamReader(input), getNameCoder());
    } catch (final XMLStreamException e) {
        throw new StreamException(e);
    }
}
 
Example #9
Source File: JettisonMappedXmlDriver.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public HierarchicalStreamWriter createWriter(final Writer writer) {
    try {
        if (useSerializeAsArray) {
            return new JettisonStaxWriter(new QNameMap(), mof.createXMLStreamWriter(writer), getNameCoder(), convention);
        } else {
            return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(writer), getNameCoder());
        }
    } catch (final XMLStreamException e) {
        throw new StreamException(e);
    }
}
 
Example #10
Source File: JettisonMappedXmlDriver.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public HierarchicalStreamWriter createWriter(final OutputStream output) {
    try {
        if (useSerializeAsArray) {
            return new JettisonStaxWriter(new QNameMap(), mof.createXMLStreamWriter(output), getNameCoder(), convention);
        } else {
            return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(output), getNameCoder());
        }
    } catch (final XMLStreamException e) {
        throw new StreamException(e);
    }
}
 
Example #11
Source File: XStreamMarshaller.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Override
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
	try {
		doMarshal(graph, new StaxWriter(new QNameMap(), streamWriter, this.nameCoder), null);
	}
	catch (XMLStreamException ex) {
		throw convertXStreamException(ex, true);
	}
}
 
Example #12
Source File: XStreamMarshaller.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
	return doUnmarshal(new StaxReader(new QNameMap(), streamReader, this.nameCoder), null);
}
 
Example #13
Source File: XStreamMarshaller.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
	return doUnmarshal(new StaxReader(new QNameMap(), streamReader, this.nameCoder), null);
}
 
Example #14
Source File: JettisonStaxWriter.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public JettisonStaxWriter(
    QNameMap qnameMap, XMLStreamWriter out, MappedNamespaceConvention convention)
    throws XMLStreamException {
    super(qnameMap, out);
    this.convention = convention;
}
 
Example #15
Source File: XStreamMarshaller.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
       return doUnmarshal(new StaxReader(new QNameMap(), streamReader, this.nameCoder), null);
}