|
From: <pe...@us...> - 2004-01-13 23:38:02
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml In directory sc8-pr-cvs1:/tmp/cvs-serv25308/src/java/org/neuclear/xml Modified Files: XMLTools.java Log Message: Refactoring parts of the core of XMLSignature. There shouldnt be any real API changes. Index: XMLTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/XMLTools.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XMLTools.java 10 Dec 2003 23:57:05 -0000 1.4 --- XMLTools.java 13 Jan 2004 23:37:59 -0000 1.5 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.5 2004/01/13 23:37:59 pelle + * Refactoring parts of the core of XMLSignature. There shouldnt be any real API changes. + * * Revision 1.4 2003/12/10 23:57:05 pelle * Did some cleaning up in the builders *************** *** 147,150 **** --- 150,154 ---- import java.io.*; import java.net.MalformedURLException; + import java.net.URL; *************** *** 178,182 **** return DocumentHelper.createDocument(); } ! public static Document loadDocument(final InputStream is) throws XMLException { try { --- 182,200 ---- return DocumentHelper.createDocument(); } ! public static Document loadDocument(final String url) throws XMLException{ ! try { ! return loadDocument(new URL(url)); ! } catch (MalformedURLException e) { ! throw new XMLException(e); ! } ! } ! public static Document loadDocument(final URL url) throws XMLException { ! try { ! final SAXReader xmlReader = new SAXReader(); ! return xmlReader.read(url); ! } catch (Exception e) { ! throw new XMLException(e); ! } ! } public static Document loadDocument(final InputStream is) throws XMLException { try { *************** *** 184,190 **** return xmlReader.read(is); } catch (Exception e) { ! rethrowException(e); } - return null; } --- 202,207 ---- return xmlReader.read(is); } catch (Exception e) { ! throw new XMLException(e); } } *************** *** 194,202 **** return xmlReader.read(f); } catch (DocumentException e) { ! rethrowException(e); } catch (MalformedURLException e) { ! rethrowException(e); } - return null; } --- 211,218 ---- return xmlReader.read(f); } catch (DocumentException e) { ! throw new XMLException(e); } catch (MalformedURLException e) { ! throw new XMLException(e); } } |