Examples of StaxWriter


Examples of com.thoughtworks.xstream.io.xml.StaxWriter

        mof = new MappedXMLOutputFactory(nstjsons);
        mif = new MappedXMLInputFactory(nstjsons);
    }

    protected HierarchicalStreamWriter createHierarchicalStreamWriter(Exchange exchange, Object body, OutputStream stream) throws XMLStreamException {       
        return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(stream));
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

        updateCharactorEncodingInfo(exchange);
        if (getXstreamDriver() != null) {
            return getXstreamDriver().createWriter(stream);
        }
        XMLStreamWriter xmlWriter = getStaxConverter().createXMLStreamWriter(stream, exchange);
        return new StaxWriter(new QNameMap(), xmlWriter);
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

        updateCharactorEncodingInfo(exchange);
        if (getXstreamDriver() != null) {
            return getXstreamDriver().createWriter(stream);
        }
        XMLStreamWriter xmlWriter = getStaxConverter().createXMLStreamWriter(stream, exchange);
        return new StaxWriter(new QNameMap(), xmlWriter);
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

        xs.setMode(XStream.NO_REFERENCES);
        return xs;
    }

    protected HierarchicalStreamWriter createHierarchicalStreamWriter(Exchange exchange, Object body, OutputStream stream) throws XMLStreamException {       
        return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(stream));
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

    protected Message createMessage(Object object, MessageProperties messageProperties) {
        try {
            byte[] body = null;
            if(object != null) {
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
                StaxWriter writer = new StaxWriter(new QNameMap(), this.outputFactory.createXMLStreamWriter(outStream));
                this.objectMapper.marshal(object, writer);
                body = outStream.toByteArray();
            }
           
            messageProperties.setContentType(MessageProperties.CONTENT_TYPE_JSON);
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

  }

  @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);
    }
  }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

        return new XStream();
    }

    protected HierarchicalStreamWriter createHierarchicalStreamWriter(Exchange exchange, Object body, OutputStream stream) throws XMLStreamException {
        XMLStreamWriter xmlWriter = getStaxConverter().createXMLStreamWriter(stream);
        return new StaxWriter(new QNameMap(), xmlWriter);
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

    @Override
    public StaxWriter createStaxWriter(final XMLStreamWriter out, boolean writeStartEndDocument)
        throws XMLStreamException {

      return new StaxWriter(map, out, writeStartEndDocument, isRepairingNamespace(), xmlFriendlyReplacer()) {
        int indent = 0;
        boolean justStarted = false;

        public void startNode(String name) {
          if (indent > 0)
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

    protected Message createMessage(Object object, MessageProperties messageProperties) {
        try {
            byte[] body = null;
            if(object != null) {
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
                StaxWriter writer = new StaxWriter(new QNameMap(), this.outputFactory.createXMLStreamWriter(outStream));
                this.objectMapper.marshal(object, writer);
                body = outStream.toByteArray();
            }
           
            messageProperties.setContentType(MessageProperties.CONTENT_TYPE_JSON);
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxWriter

    protected Message createMessage(Object object, MessageProperties messageProperties) {
        try {
            byte[] body = null;
            if(object != null) {
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
                StaxWriter writer = new StaxWriter(new QNameMap(), this.outputFactory.createXMLStreamWriter(outStream));
                this.objectMapper.marshal(object, writer);
                body = outStream.toByteArray();
            }
           
            messageProperties.setContentType(MessageProperties.CONTENT_TYPE_JSON);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.