Java XML JAXB Unmarshaller unMarshal(String contextPath, InputStream xmlStream)

Here you can find the source of unMarshal(String contextPath, InputStream xmlStream)

Description

un Marshal

License

Open Source License

Declaration

public static Object unMarshal(String contextPath, InputStream xmlStream) throws JAXBException 

Method Source Code


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

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

import javax.xml.bind.Unmarshaller;

import java.io.InputStream;

public class Main {

    public static Object unMarshal(String contextPath, InputStream xmlStream) throws JAXBException {
        JAXBContext jc = JAXBContext.newInstance(contextPath);
        Unmarshaller u = jc.createUnmarshaller();

        return u.unmarshal(xmlStream);
    }/*from  w  w  w  .  j  a v a  2 s . c  om*/
}

Related

  1. unmarshal(JAXBContext jaxbContext, XMLStreamReader xmlStreamReader)
  2. unmarshal(org.w3c.dom.Element elem, Class c)
  3. unmarshal(org.w3c.dom.Element elem, Class c)
  4. unmarshal(String b, Class implClass, Class... bc)
  5. unmarshal(String content, Class clasz)
  6. unmarshal(String ObjXml, Class configurationClass)
  7. unmarshal(String packageName, InputStream inputStream)
  8. unmarshal(String string, Class clazz)
  9. unmarshal(String xml, Class c)