@Override public HierarchicalStreamReader createReader(InputStream in) { return createDcsReader(in); }
@Override public HierarchicalStreamWriter createWriter(OutputStream out) { return createStreamWriter(out); }
public DcsStreamSupport() { this.streamFilter = new DcsStreamFilter(); this.writeStartDoc = false; }
@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(source, writer, context); final DateTime date = (DateTime) source; writer.startNode(E_DATE); writer.setValue(fmt.print(date)); writer.endNode(); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param writer the writer to write to */ public void copyNode(DcsStaxWriter writer) throws XMLStreamException { Assertion.notNull(writer); final DcsStreamSupport dcsStream = new DcsStreamSupport(); dcsStream.copyNode(in, writer.getXMLStreamWriter()); }
/** * Copies the current node and its children to the <code>sink</code>. * * @param in * @param out the output sink * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, XMLStreamWriter out) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(out); final DcsStreamSupport dss = new DcsStreamSupport(); dss.copyNode(in, out); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param in * @param writer the writer to write to * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, DcsStaxWriter writer) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(writer); copyNode(in, writer.getXMLStreamWriter()); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param in * @param writer the writer to write to * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, DcsStaxWriter writer) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(writer); copyNode(in, writer.getXMLStreamWriter()); }
public DcsXstreamStaxModelBuilder() { x = XStreamFactory.newInstance(); }
public static InputStream asInputStream(Dcp dcp) { DcsModelBuilder mb = new DcsXstreamStaxModelBuilder(); ByteArray dcp_bytes = new ByteArray(32 * 1024); mb.buildSip(dcp, dcp_bytes.asOutputStream()); return dcp_bytes.asInputStream(); }
@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(source, writer, context); final DateTime date = (DateTime) source; writer.startNode(E_DATE); writer.setValue(fmt.print(date)); writer.endNode(); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param writer the writer to write to */ public void copyNode(DcsStaxWriter writer) throws XMLStreamException { Assertion.notNull(writer); final DcsStreamSupport dcsStream = new DcsStreamSupport(); dcsStream.copyNode(in, writer.getXMLStreamWriter()); }
/** * Copies the current node and its children to the <code>sink</code>. * * @param in * @param out the output sink * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, XMLStreamWriter out) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(out); final DcsStreamSupport dss = new DcsStreamSupport(); dss.copyNode(in, out); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param in * @param writer the writer to write to * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, DcsStaxWriter writer) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(writer); copyNode(in, writer.getXMLStreamWriter()); }
@Override public HierarchicalStreamReader createReader(InputStream in) { return createDcsReader(in); }
@Override public HierarchicalStreamWriter createWriter(OutputStream out) { return createStreamWriter(out); }
public DcsStreamSupport(boolean writeStartDoc) { this.writeStartDoc = writeStartDoc; this.streamFilter = new DcsStreamFilter(); }
@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context){ super.marshal(source, writer, context); final Point point = (Point) source; writer.startNode(E_COORDINATE); writer.setValue(point.toString()); writer.endNode(); } @Override
/** * Copies the current node and its children to the <code>sink</code>. * * @param in * @param out the output sink * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, XMLStreamWriter out) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(out); final DcsStreamSupport dss = new DcsStreamSupport(); dss.copyNode(in, out); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param writer the writer to write to */ public void copyNode(FDOStaxWriter writer) throws XMLStreamException { Assertion.notNull(writer); final DcsStreamSupport dcsStream = new DcsStreamSupport(); dcsStream.copyNode(in, writer.getXMLStreamWriter()); }