Package com.wutka.jox

Examples of com.wutka.jox.MyJOXBeanInputStream


    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

Related Classes of com.wutka.jox.MyJOXBeanInputStream

Copyright © 2018 www.massapicom. 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.