Exemplo n.º 1
0
  /**
   * 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);
  }
Exemplo n.º 2
0
  /**
   * 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);
  }