Here you can find the source of unmarshal(InputStream stream, Class
Parameter | Description |
---|---|
stream | Input stream to read from |
clazz | Class of object |
public static <O> O unmarshal(InputStream stream, Class<O> clazz) throws Exception
//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); } }