/** * Writes the ChecksumList class to an output stream. * * <p> * * @param os The output stream to write to * @throw JAXBException Upon error writing the XML file */ public void encode(OutputStream os) throws JAXBException { updateInternal(); Marshaller marshaller = context.createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(this, os); }
/** * Writes the ChecksumList class to an output writer. * * <p> * * @param w The output writer to write to * @throw JAXBException Upon error writing the XML file */ public void encode(Writer w) throws JAXBException { /* Convert internal checksum hash to one suitable for serialization */ updateInternal(); Marshaller marshaller = context.createMarshaller(); marshaller.setProperty("jaxb.formatted.output", true); marshaller.marshal(this, w); }