List of usage examples for javax.xml.crypto URIReferenceException URIReferenceException
public URIReferenceException(Throwable cause)
From source file:be.fedict.eid.applet.service.signer.asic.ASiCURIDereferencer.java
public Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException { if (null == uriReference) { throw new URIReferenceException("URIReference cannot be null"); }//from w w w . j av a2 s.com if (null == context) { throw new URIReferenceException("XMLCrytoContext cannot be null"); } String uri = uriReference.getURI(); try { uri = URLDecoder.decode(uri, "UTF-8"); } catch (UnsupportedEncodingException e) { LOG.warn("could not URL decode the uri: " + uri); } LOG.debug("dereference: " + uri); InputStream zipInputStream; if (null != this.tmpFile) { try { zipInputStream = new FileInputStream(this.tmpFile); } catch (FileNotFoundException e) { throw new URIReferenceException("file not found error: " + e.getMessage(), e); } } else { zipInputStream = new ByteArrayInputStream(this.data); } InputStream dataInputStream; try { dataInputStream = ODFUtil.findDataInputStream(zipInputStream, uri); } catch (IOException e) { throw new URIReferenceException("I/O error: " + e.getMessage(), e); } if (null == dataInputStream) { return this.baseUriDereferener.dereference(uriReference, context); } return new OctetStreamData(dataInputStream, uri, null); }