當前位置: 首頁>>代碼示例>>Java>>正文


Java LocalJavaKeyStoreProvider類代碼示例

本文整理匯總了Java中org.apache.hadoop.security.alias.LocalJavaKeyStoreProvider的典型用法代碼示例。如果您正苦於以下問題:Java LocalJavaKeyStoreProvider類的具體用法?Java LocalJavaKeyStoreProvider怎麽用?Java LocalJavaKeyStoreProvider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LocalJavaKeyStoreProvider類屬於org.apache.hadoop.security.alias包,在下文中一共展示了LocalJavaKeyStoreProvider類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: nestURIForLocalJavaKeyStoreProvider

import org.apache.hadoop.security.alias.LocalJavaKeyStoreProvider; //導入依賴的package包/類
/**
 * Mangle given local java keystore file URI to allow use as a
 * LocalJavaKeyStoreProvider.
 * @param localFile absolute URI with file scheme and no authority component.
 *                  i.e. return of File.toURI,
 *                  e.g. file:///home/larry/creds.jceks
 * @return URI of the form localjceks://file/home/larry/creds.jceks
 * @throws IllegalArgumentException if localFile isn't not a file uri or if it
 *                                  has an authority component.
 * @throws URISyntaxException if the wrapping process violates RFC 2396
 */
public static URI nestURIForLocalJavaKeyStoreProvider(final URI localFile)
    throws URISyntaxException {
  if (!("file".equals(localFile.getScheme()))) {
    throw new IllegalArgumentException("passed URI had a scheme other than " +
        "file.");
  }
  if (localFile.getAuthority() != null) {
    throw new IllegalArgumentException("passed URI must not have an " +
        "authority component. For non-local keystores, please use " +
        JavaKeyStoreProvider.class.getName());
  }
  return new URI(LocalJavaKeyStoreProvider.SCHEME_NAME,
      "//file" + localFile.getSchemeSpecificPart(), localFile.getFragment());
}
 
開發者ID:nucypher,項目名稱:hadoop-oss,代碼行數:26,代碼來源:ProviderUtils.java


注:本文中的org.apache.hadoop.security.alias.LocalJavaKeyStoreProvider類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。