com.github.kunalk16.excel.utils.jaxb.JAXBUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lightExcelReader Show documentation
Show all versions of lightExcelReader Show documentation
A lightweight Java framework to read .xlsx excel files.
package com.github.kunalk16.excel.utils.jaxb;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.InputStream;
@SuppressWarnings("unchecked")
public class JAXBUtils {
public static T unMarshall(InputStream inputStream, Class modelClass) throws JAXBException {
JAXBContext jaxbContext = JAXBContext.newInstance(modelClass);
Unmarshaller jaxbUnMarshaller = jaxbContext.createUnmarshaller();
return (T) jaxbUnMarshaller.unmarshal(inputStream);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy