当前位置: 首页>>代码示例>>Java>>正文


Java DigiDocException.getNestedException方法代码示例

本文整理汇总了Java中ee.sk.digidoc.DigiDocException.getNestedException方法的典型用法代码示例。如果您正苦于以下问题:Java DigiDocException.getNestedException方法的具体用法?Java DigiDocException.getNestedException怎么用?Java DigiDocException.getNestedException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ee.sk.digidoc.DigiDocException的用法示例。


在下文中一共展示了DigiDocException.getNestedException方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeDataFile

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
private void removeDataFile(File file) {
  logger.info("Removing data file: " + file.getName());
  int index = -1;
  ArrayList ddocDataFiles = ddoc.getDataFiles();
  for (int i = 0; i < ddocDataFiles.size(); i++) {
    ee.sk.digidoc.DataFile dataFile = (ee.sk.digidoc.DataFile) ddocDataFiles.get(i);
    if (dataFile.getFileName().equalsIgnoreCase(file.getName())) index = i;
  }
  if (index == -1) {
    DigiDoc4JException exception = new DigiDoc4JException("File not found");
    logger.error(exception.toString());
    throw exception;
  }

  try {
    ddoc.removeDataFile(index);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:22,代码来源:DDocFacade.java

示例2: signRaw

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
public Signature signRaw(byte[] rawSignature) {
  logger.info("Finalizing DDoc signature");
  try {
    ddocSignature.setSignatureValue(rawSignature);
    DDocSignature signature = new DDocSignature(ddocSignature);
    if (signatureProfile == SignatureProfile.LT_TM) {
      ddocSignature.getConfirmation();
    }
    signature.setIndexInArray(getSignatureIndexInArray());
    logger.info("Signing DDoc successfully completed");
    return signature;
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:17,代码来源:DDocFacade.java

示例3: createDDOCContainer

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
private void createDDOCContainer() {
  logger.debug("");
  try {
    ddoc = new SignedDoc("DIGIDOC-XML", "1.3");
    signatureParameters.setDigestAlgorithm(DigestAlgorithm.SHA1);
    logger.info("DDoc container created");
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:12,代码来源:DDocFacade.java

示例4: addDataFile

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
public DataFile addDataFile(String path, String mimeType) {
  logger.info("Adding data file: " + path + ", mime type " + mimeType);
  try {
    ddoc.addDataFile(new File(path), mimeType, CONTENT_EMBEDDED_BASE64);
    return new DataFile(path, mimeType);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:11,代码来源:DDocFacade.java

示例5: addRawSignature

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
public void addRawSignature(InputStream signatureStream) {
  logger.info("Adding raw XAdES signature");
  try {
    ddoc.readSignature(signatureStream);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:10,代码来源:DDocFacade.java

示例6: removeSignature

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
/**
 * @deprecated will be removed in the future.
 */
public void removeSignature(int index) {
  logger.info("Removing signature index: " + index);
  try {
    ddoc.removeSignature(index);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:13,代码来源:DDocFacade.java

示例7: save

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
public void save(String path) {
  logger.info("Saving container to path: " + path);
  try {
    ddoc.writeToFile(new File(path));
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:10,代码来源:DDocFacade.java

示例8: sign

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
public Signature sign(SignatureToken signer) {
  logger.info("Signing DDoc container");
  calculateSignature(signer);
  try {
    signRaw(signer.sign(getDigestAlgorithm(), ddocSignature.calculateSignedInfoXML()));
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }

  return new DDocSignature(ddocSignature);
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:13,代码来源:DDocFacade.java

示例9: addConfirmation

import ee.sk.digidoc.DigiDocException; //导入方法依赖的package包/类
private void addConfirmation() {
  logger.debug("");
  for (Object signature : ddoc.getSignatures()) {
    try {
      ((ee.sk.digidoc.Signature) signature).getConfirmation();
    } catch (DigiDocException e) {
      logger.error(e.getMessage());
      throw new DigiDoc4JException(e.getNestedException());
    }
  }
}
 
开发者ID:open-eid,项目名称:digidoc4j,代码行数:12,代码来源:DDocFacade.java


注:本文中的ee.sk.digidoc.DigiDocException.getNestedException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。