Java XML JAXB Unmarshaller unmarshal(InputStream stream, Class clazz)

Here you can find the source of unmarshal(InputStream stream, Class clazz)

Description

Unmarshal an arbitrary object with JAXB.

License

Open Source License

Parameter

Parameter Description
stream Input stream to read from
clazz Class of object

Declaration

public static <O> O unmarshal(InputStream stream, Class<O> clazz) 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 {
    /**//  ww  w  .  j  a v  a2 s .co m
     * Unmarshal an arbitrary object with JAXB.
     *
     * @param stream Input stream to read from
     * @param clazz Class of object
     */
    public static <O> O unmarshal(InputStream stream, Class<O> clazz) throws Exception {
        return JAXB.unmarshal(stream, clazz);
    }
}

Related

  1. unmarshal(InputStream content, Class expectedType)
  2. unmarshal(InputStream in, Class... boundClasses)
  3. unmarshal(InputStream inputStream, Class entityClass)
  4. unmarshal(InputStream inputStream, Class type)
  5. unmarshal(InputStream is, Class clazz)
  6. unmarshal(JAXBContext context, Class clazz, String source)
  7. unmarshal(JAXBContext jaxbContext, XMLStreamReader xmlStreamReader)
  8. unmarshal(org.w3c.dom.Element elem, Class c)
  9. unmarshal(org.w3c.dom.Element elem, Class c)