Package javax.xml.stream

Examples of javax.xml.stream.XMLStreamWriter.writeEndDocument()


                }
                mc.put(XMLStreamWriter.class.getName(), writer);
            }   
            marshalToWriter(ms, obj, writer, mt);
            if (mc != null && mc.getContent(XMLStreamWriter.class) != null) {
                writer.writeEndDocument();
                writer.flush();
                writer.close();
            }
        } else {
            marshalToOutputStream(ms, obj, os, mt);
View Full Code Here


                mc.put(XMLStreamWriter.class.getName(), writer);   
            }
               
            marshalToWriter(ms, obj, writer, mt);
            if (mc != null && mc.getContent(XMLStreamWriter.class) != null) {
                writer.writeEndDocument();
                writer.flush();
                writer.close();
            }
        } else {
            marshalToOutputStream(ms, obj, os, mt);
View Full Code Here

       
        public void handleMessage(Message mc) throws Fault {
            try {
                XMLStreamWriter xtw = mc.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndDocument();
                    xtw.flush();
                    xtw.close();
                }

                OutputStream os = (OutputStream) mc.get(OUTPUT_STREAM_HOLDER);
View Full Code Here

        throws JAXBException {
        CachedOutputStream out = new CachedOutputStream();
        try {
            XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(out);
            StaxUtils.copy(new StaxSource(reader), writer);
            writer.writeEndDocument();
            writer.flush();
            writer.close();
            return unmarshalFromInputStream(unmarshaller, out.getInputStream(), anns, mt);
        } catch (Exception ex) {
            throw ExceptionUtils.toBadRequestException(ex, null);
View Full Code Here

       
        public void handleMessage(Message mc) throws Fault {
            try {
                XMLStreamWriter xtw = mc.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndDocument();
                    xtw.flush();
                    xtw.close();
                }

                OutputStream os = (OutputStream) mc.get(OUTPUT_STREAM_HOLDER);
View Full Code Here

                }
                mc.put(XMLStreamWriter.class.getName(), writer);   
            }
            marshalToWriter(ms, obj, writer, anns, mt);
            if (mc != null) {
                writer.writeEndDocument();
            }
        } else {
            marshalToOutputStream(ms, obj, os, anns, mt);
        }
    }
View Full Code Here

                    ms.setProperty(Marshaller.JAXB_FRAGMENT, true);
                }
                mc.put(XMLStreamWriter.class.getName(), writer);   
            }
            marshalToWriter(ms, obj, writer, mt);
            writer.writeEndDocument();
        } else {
            marshalToOutputStream(ms, obj, os, mt);
        }
    }
   
View Full Code Here

                mc.put(XMLStreamWriter.class.getName(), writer);   
            }
               
            marshalToWriter(ms, obj, writer, mt);
            if (mc != null && mc.getContent(XMLStreamWriter.class) != null) {
                writer.writeEndDocument();
                writer.flush();
                writer.close();
            }
        } else {
            marshalToOutputStream(ms, obj, os, mt);
View Full Code Here

        public void handleMessage(Message message) throws Fault {
            try {
                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndDocument();
                    xtw.flush();
                    xtw.close();
                }

                OutputStream os = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
View Full Code Here

                if (xtw != null) {
                    // Write body end
                    xtw.writeEndElement();           
                    // Write Envelope end element
                    xtw.writeEndElement();
                    xtw.writeEndDocument();
                   
                    xtw.flush();
                }
            } catch (XMLStreamException e) {
                if (e.getCause() instanceof EOFException) {
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.