Package org.codehaus.jettison.badgerfish

Examples of org.codehaus.jettison.badgerfish.BadgerFishXMLStreamWriter


    *
    */
   protected static XMLStreamWriter getBadgerFishXMLStreamWriter(OutputStream entityStream)
   {
      OutputStreamWriter out = new OutputStreamWriter(entityStream);
      XMLStreamWriter writer = new BadgerFishXMLStreamWriter(out);
      return writer;
   }
View Full Code Here


            OutputStreamWriter writer =
                new OutputStreamWriter(entityStream, ProviderUtils.getCharset(mediaType));

            XMLStreamWriter xsw = null;
            if (isBadgerFishConventionUsed) {
                xsw = new BadgerFishXMLStreamWriter(writer);
            } else {
                try {
                    xsw =
                        new MappedXMLOutputFactory(outputConfiguration)
                            .createXMLStreamWriter(writer);
View Full Code Here

            Object entityToMarshal = getEntityToMarshal(t, type);

            // Use an OutputStream directly instead of a Writer for performance.
            XMLStreamWriter xsw = null;
            if (isBadgerFishConventionUsed) {
                xsw = new BadgerFishXMLStreamWriter(new OutputStreamWriter(entityStream));
            } else {
                MappedNamespaceConvention con = new MappedNamespaceConvention(outputConfiguration);
                xsw = new MappedXMLStreamWriter(con, new OutputStreamWriter(entityStream));
            }
            marshaller.marshal(entityToMarshal, xsw);
View Full Code Here

    }

    public Object transform(XMLStreamReader source, TransformationContext context) {
        try {
            StringWriter writer = new StringWriter();
            XMLStreamWriter jsonWriter = new BadgerFishXMLStreamWriter(writer);
            XMLStreamSerializer serializer = new XMLStreamSerializer();
            serializer.serialize(source, jsonWriter);
            source.close();
            Class type = null;
            if (context != null && context.getTargetDataType() != null) {
View Full Code Here

            Charset charset = Charset.forName(ProviderUtils.getCharset(mediaType));
            OutputStreamWriter writer = new OutputStreamWriter(entityStream, charset);

            XMLStreamWriter xsw = null;
            if (isBadgerFishConventionUsed) {
                xsw = new BadgerFishXMLStreamWriter(writer);
            } else {
                try {
                    xsw =
                        new MappedXMLOutputFactory(outputConfiguration)
                            .createXMLStreamWriter(writer);
View Full Code Here

            Object entityToMarshal = getEntityToMarshal(t, type);

            // Use an OutputStream directly instead of a Writer for performance.
            XMLStreamWriter xsw = null;
            if (isBadgerFishConventionUsed) {
                xsw = new BadgerFishXMLStreamWriter(new OutputStreamWriter(entityStream));
            } else {
                MappedNamespaceConvention con = new MappedNamespaceConvention(outputConfiguration);
                xsw = new MappedXMLStreamWriter(con, new OutputStreamWriter(entityStream));
            }
            marshaller.marshal(entityToMarshal, xsw);
View Full Code Here

    }

    public Object transform(XMLStreamReader source, TransformationContext context) {
        try {
            StringWriter writer = new StringWriter();
            XMLStreamWriter jsonWriter = new BadgerFishXMLStreamWriter(writer);
            XMLStreamSerializer serializer = new XMLStreamSerializer();
            serializer.serialize(source, jsonWriter);
            source.close();
            Class type = null;
            if (context != null && context.getTargetDataType() != null) {
View Full Code Here

    }

    public Object transform(XMLStreamReader source, TransformationContext context) {
        try {
            StringWriter writer = new StringWriter();
            XMLStreamWriter jsonWriter = new BadgerFishXMLStreamWriter(writer);
            XMLStreamSerializer serializer = new XMLStreamSerializer();
            serializer.serialize(source, jsonWriter);
            source.close();
            Class type = null;
            if (context != null && context.getTargetDataType() != null) {
View Full Code Here

    }

    public Object transform(XMLStreamReader source, TransformationContext context) {
        try {
            StringWriter writer = new StringWriter();
            XMLStreamWriter jsonWriter = new BadgerFishXMLStreamWriter(writer);
            staxHelper.save(source, jsonWriter);
            source.close();
            Class type = null;
            if (context != null && context.getTargetDataType() != null) {
                type = context.getTargetDataType().getPhysical();
View Full Code Here

    }

    public Object transform(XMLStreamReader source, TransformationContext context) {
        try {
            StringWriter writer = new StringWriter();
            XMLStreamWriter jsonWriter = new BadgerFishXMLStreamWriter(writer);
            XMLStreamSerializer serializer = new XMLStreamSerializer();
            serializer.serialize(source, jsonWriter);
            source.close();
            Class type = null;
            if (context != null && context.getTargetDataType() != null) {
View Full Code Here

TOP

Related Classes of org.codehaus.jettison.badgerfish.BadgerFishXMLStreamWriter

Copyright © 2018 www.massapicom. 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.