/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final File output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { try (OutputStream s = new BufferedOutputStream(new FileOutputStream(output))) { marshal(object, OutputFactory.createXMLEventWriter(s, getEncoding()), version); } } catch (IOException | XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final File output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { try (OutputStream s = new BufferedOutputStream(new FileOutputStream(output))) { marshal(object, OutputFactory.createXMLStreamWriter(s, getEncoding()), version); } } catch (IOException | XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final Node output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLStreamWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final Result output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLEventWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final Writer output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLStreamWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final XMLStreamWriter output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLEventWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final Result output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLStreamWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final ContentHandler output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLEventWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final ContentHandler output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLStreamWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final Node output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLEventWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final XMLEventWriter output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLStreamWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final Writer output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLEventWriter(output), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(final Object object, final OutputStream output) throws JAXBException { final FilterVersion version = getFilterVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLStreamWriter(output, getEncoding()), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(toImplementation(object), output); } finally { context.finish(); } } }
/** * Delegates the marshalling to the wrapped marshaller. */ @Override public void marshal(Object object, final OutputStream output) throws JAXBException { object = toImplementation(object); // Must be call before getTransformVersion() final TransformVersion version = getTransformVersion(); if (version != null) try { marshal(object, OutputFactory.createXMLEventWriter(output, getEncoding()), version); } catch (XMLStreamException e) { throw new JAXBException(e); } else { // Marshalling to the default GML version. final Context context = begin(); try { marshaller.marshal(object, output); } finally { context.finish(); } } }