本文整理匯總了Java中javax.xml.crypto.dsig.XMLSignatureFactory.getURIDereferencer方法的典型用法代碼示例。如果您正苦於以下問題:Java XMLSignatureFactory.getURIDereferencer方法的具體用法?Java XMLSignatureFactory.getURIDereferencer怎麽用?Java XMLSignatureFactory.getURIDereferencer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.xml.crypto.dsig.XMLSignatureFactory
的用法示例。
在下文中一共展示了XMLSignatureFactory.getURIDereferencer方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LocalHttpCacheURIDereferencer
import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
public LocalHttpCacheURIDereferencer() {
XMLSignatureFactory xmlSignatureFactory =
XMLSignatureFactory.getInstance("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI());
ud = xmlSignatureFactory.getURIDereferencer();
String base = BASEDIR == null ? "./": BASEDIR;
File dir = new File(base + FS + "src/test/resources" + FS + "javax" +
FS + "xml" + FS + "crypto" + FS + "dsig");
uriMap = new HashMap<String, File>();
uriMap.put("http://www.w3.org/TR/xml-stylesheet",
new File(dir, "xml-stylesheet"));
uriMap.put("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64",
new File(dir, "xml-stylesheet.b64"));
uriMap.put("http://www.ietf.org/rfc/rfc3161.txt",
new File(dir, "rfc3161.txt"));
}
示例2: ODFURIDereferencer
import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
private ODFURIDereferencer(URL odfUrl, byte[] odfData) {
if (null == odfUrl && null == odfData) {
throw new IllegalArgumentException("odfUrl and odfData are null");
}
if (null != odfUrl && null != odfData) {
throw new IllegalArgumentException("odfUrl and odfData are both not null");
}
this.odfUrl = odfUrl;
this.odfData = odfData;
XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance();
this.baseUriDereferener = xmlSignatureFactory.getURIDereferencer();
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
try {
this.documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new RuntimeException("parser config error: " + e.getMessage(), e);
}
EntityResolver entityResolver = new ODFEntityResolver();
this.documentBuilder.setEntityResolver(entityResolver);
}
示例3: ASiCURIDereferencer
import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
protected ASiCURIDereferencer(byte[] data, File tmpFile) {
this.data = data;
this.tmpFile = tmpFile;
XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance();
this.baseUriDereferener = xmlSignatureFactory.getURIDereferencer();
}
示例4: OOXMLURIDereferencer
import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
protected OOXMLURIDereferencer(byte[] ooxmlDocument, URL ooxmlUrl) {
if (null == ooxmlUrl && null == ooxmlDocument) {
throw new IllegalArgumentException("need some reference to the OOXML document");
}
this.ooxmlUrl = ooxmlUrl;
this.ooxmlDocument = ooxmlDocument;
XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance();
this.baseUriDereferencer = xmlSignatureFactory.getURIDereferencer();
}