Here you can find the source of unMarshal(String contextPath, InputStream xmlStream)
public static Object unMarshal(String contextPath, InputStream xmlStream) throws JAXBException
//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*/ }