Examples of JOXBeanInputStream


Examples of com.wutka.jox.JOXBeanInputStream

    public static Object fromXML(FileInputStream fileIn, Class className) throws Exception {
       
        doctypeDeclaration = null; // Clear the DOCTYPE declaration variable
       
        //ByteArrayInputStream xmlData = new ByteArrayInputStream(xml.getBytes());
        JOXBeanInputStream joxIn = new MyJOXBeanInputStream(fileIn);
       
        try {
            return (Object) joxIn.readObject(className);
            /*
            TestBean testBean = (TestBean) joxIn.readObject(
                TestBean.class);*/
           
        } catch (IOException exc) {
            exc.printStackTrace();
            return null;
        } finally {
            try {
                //xmlData.close();
                fileIn.close();
                joxIn.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.