class JaxbUtil {

    public static <T> T unmarshal(InputStream inputStream, Class<T> type) {

        try {
            return UnmarshallerBuilder.create().build().unmarshal(new StreamSource(inputStream), type).getValue();
        } catch (JAXBException ex) {
            throw new ConfigException(ex);
        }
    }

    private  JaxbUtil();

}