Java XML JAXB Marshaller marshal(Object object, OutputStream stream)

Here you can find the source of marshal(Object object, OutputStream stream)

Description

Marshal an arbitrary object with JAXB.

License

Open Source License

Parameter

Parameter Description
object Object
stream Output stream to write to

Declaration

public static void marshal(Object object, OutputStream stream) throws Exception 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.xml.bind.JAXB;
import java.io.*;

public class Main {
    /**/* w w  w .j  a va  2  s. c  om*/
     * Marshal an arbitrary object with JAXB.
     *
     * @param object Object
     * @param stream Output stream to write to
     */
    public static void marshal(Object object, OutputStream stream) throws Exception {
        JAXB.marshal(object, stream);
        stream.close();
    }
}

Related

  1. marshal(Object obj, OutputStream stream)
  2. marshal(Object object)
  3. marshal(Object object)
  4. marshal(Object object)
  5. marshal(Object object, File file, JAXBContext ctx)
  6. marshal(Object objectToMarshal)
  7. marshal(Object source, Class configurationClass)
  8. marshal(T bean, Class... bc)
  9. marshal(T clazz)