Examples of XppReader


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

            try {
                String text = new String(command.getContent(), "UTF-8");
                switch (Stomp.Transformations.getValue(transformation)) {
                case JMS_OBJECT_XML:
                    in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
                    msg = createObjectMessage(in);
                    break;
                case JMS_OBJECT_JSON:
                    in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
                    msg = createObjectMessage(in);
                    break;
                case JMS_MAP_XML:
                    in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
                    msg = createMapMessage(in);
                    break;
                case JMS_MAP_JSON:
                    in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
                    msg = createMapMessage(in);
View Full Code Here

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

        HierarchicalStreamReader in = new JettisonMappedXmlDriver().createReader(new StringReader(data));
        return createObject(in);
    }

    protected SamplePojo createObjectFromXml(String data) throws Exception {
        HierarchicalStreamReader in = new XppReader(new StringReader(data), XppFactory.createDefaultParser());
        return createObject(in);
    }
View Full Code Here

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

        HierarchicalStreamReader in = new JettisonMappedXmlDriver().createReader(new StringReader(data));
        return createMapObject(in);
    }

    protected Map<String, String> createMapFromXml(String data) throws Exception {
        HierarchicalStreamReader in = new XppReader(new StringReader(data), XppFactory.createDefaultParser());
        return createMapObject(in);
    }
View Full Code Here

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

            try {
                String text = new String(command.getContent(), "UTF-8");
                switch (Transformations.getValue(transformation)) {
                    case JMS_OBJECT_XML:
                        in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
                        msg = createObjectMessage(in);
                        break;
                    case JMS_OBJECT_JSON:
                        in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
                        msg = createObjectMessage(in);
                        break;
                    case JMS_MAP_XML:
                        in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
                        msg = createMapMessage(in);
                        break;
                    case JMS_MAP_JSON:
                        in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
                        msg = createMapMessage(in);
View Full Code Here

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

      try {
        String text = new String(command.getContent(), "UTF-8");
        switch (Stomp.Transformations.getValue(transformation)) {
        case JMS_OBJECT_XML:
          in = new XppReader(new StringReader(text));
          msg = createObjectMessage(in);
          break;
        case JMS_OBJECT_JSON:
          in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
          msg = createObjectMessage(in);
          break;
        case JMS_MAP_XML:
          in = new XppReader(new StringReader(text));
          msg = createMapMessage(in);
          break;
        case JMS_MAP_JSON:
          in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
          msg = createMapMessage(in);
View Full Code Here

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

            try {
                String text = new String(command.getContent(), "UTF-8");
                switch (Stomp.Transformations.getValue(transformation)) {
                case JMS_OBJECT_XML:
                    in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
                    msg = createObjectMessage(in);
                    break;
                case JMS_OBJECT_JSON:
                    in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
                    msg = createObjectMessage(in);
                    break;
                case JMS_MAP_XML:
                    in = new XppReader(new StringReader(text), XppFactory.createDefaultParser());
                    msg = createMapMessage(in);
                    break;
                case JMS_MAP_JSON:
                    in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
                    msg = createMapMessage(in);
View Full Code Here

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

        public boolean loadHistory(String id) {
            File file = new File(getHistoryFilePath(id));
            if (!file.exists()) return false;
            HierarchicalStreamReader xmlReader = null;
            try {
                xmlReader = new XppReader(new InputStreamReader(new FileInputStream(file), myCharset));
                String text = loadHistory(xmlReader, id);
                if (text != null) {
                    myContent = text;
                    return true;
                }
View Full Code Here

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

     *      if the XML representation is completely new.
     */
    public Object unmarshal( Object o ) throws IOException {
        Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));
        try {
            return xs.unmarshal(new XppReader(r),o);
        } catch (StreamException e) {
            throw new IOException2("Unable to read "+file,e);
        } catch(ConversionException e) {
            throw new IOException2("Unable to read "+file,e);
        } catch(Error e) {// mostly reflection errors
View Full Code Here

Examples of de.fu_berlin.inf.dpp.util.xstream.XppReader

    @SuppressWarnings("unchecked")
    public PacketExtension parseExtension(XmlPullParser parser) {
        try {
            XStreamPacketExtension<T> result = (XStreamPacketExtension<T>) xstream
                .unmarshal(new XppReader(parser));
            result.provider = this;
            return result;
        } catch (RuntimeException e) {
            log.error("Malformed data received!", e);
            return new DropSilentlyPacketExtension();
View Full Code Here

Examples of de.fu_berlin.inf.dpp.util.xstream.XppReader

    @SuppressWarnings("unchecked")
    public IQ parseIQ(XmlPullParser parser) throws Exception {
        try {
            XStreamPacketExtension<T> result = (XStreamPacketExtension<T>) xstream
                .unmarshal(new XppReader(parser));
            result.provider = this;
            return new XStreamIQPacket<T>(result);
        } catch (RuntimeException e) {
            log.error("Malformed data received!", e);
            return null;
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.