Package org.glite.authz.pap.common.exceptions

Examples of org.glite.authz.pap.common.exceptions.XMLObjectException


        FileOutputStream fos;

        try {
            fos = new FileOutputStream(file);
        } catch (FileNotFoundException e) {
            throw new XMLObjectException("Cannot write to file: " + file.getAbsolutePath(), e);
        }

        write(fos, xmlObject, 4);
    }
View Full Code Here


        try {
            Transformer tr = TransformerFactory.newInstance().newTransformer();
            tr.setOutputProperty(OutputKeys.METHOD, "xml");
            tr.transform(new DOMSource(element), new StreamResult(outputStream));
        } catch (TransformerConfigurationException e) {
            throw new XMLObjectException(e);
        } catch (TransformerException e) {
            throw new XMLObjectException(e);
        }
    }
View Full Code Here

            tr.setOutputProperty(OutputKeys.INDENT, "yes");
            tr.setOutputProperty(OutputKeys.METHOD, "xml");
            tr.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", String.valueOf(indent));
            tr.transform(new DOMSource(getDOM(xmlObject)), new StreamResult(outputStream));
        } catch (TransformerConfigurationException e) {
            throw new XMLObjectException(e);
        } catch (TransformerException e) {
            throw new XMLObjectException(e);
        }
    }
View Full Code Here

    private static Document readDocument(File file) {
        FileInputStream fileInputStream;
        try {
            fileInputStream = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            throw new XMLObjectException("File not found: " + file.getAbsolutePath(), e);
        }

        return readDocument(fileInputStream);
    }
View Full Code Here

        try {
            BasicParserPool ppMgr = new BasicParserPool();
            ppMgr.setNamespaceAware(true);
            doc = ppMgr.parse(reader);
        } catch (XMLParserException e) {
            throw new XMLObjectException(e);
        }

        return doc;
    }
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.common.exceptions.XMLObjectException

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.