JavaTM Platform
Standard Ed. 6

java.security
클래스 KeyStore.Builder

java.lang.Object 
  상위를 확장 java.security.KeyStore.Builder
포함되어 있는 클래스:
KeyStore


public abstract static class KeyStore.Builder
extends Object

인스턴스화 해야 할 KeyStore 객체를 기술한 클래스입니다.

이 클래스의 인스턴스는, KeyStore 객체의 인스턴스화와 초기화에 필요한 정보를 캡슐화합니다. getKeyStore() 메소드를 호출하면(자), 이 처리가 기동됩니다.

이것에 의해, KeyStore 객체 작성으로부터 구성을 분리할 수가 있어 필요하게 될 때까지 패스워드 prompt를 지연화 시키는 것등이 가능해집니다.

도입된 버젼:
1.5
관련 항목:
KeyStore , KeyStoreBuilderParameters

생성자 의 개요
protected KeyStore.Builder ()
          새로운 Builder 를 구축합니다.
 
메소드의 개요
abstract  KeyStore getKeyStore ()
          이 객체가 기술하는 KeyStore 를 돌려줍니다.
abstract  KeyStore.ProtectionParameter getProtectionParameter (String  alias)
          지정된 별명 Entry 를 취득할 때에 사용해야 할 ProtectionParameter 를 돌려줍니다.
static KeyStore.Builder newInstance (KeyStore  keyStore, KeyStore.ProtectionParameter  protectionParameter)
          지정된 KeyStore 를 캡슐화하는 새로운 Builder 를 돌려줍니다.
static KeyStore.Builder newInstance (String  type, Provider  provider, File  file, KeyStore.ProtectionParameter  protection)
          새로운 Builder 객체를 돌려줍니다.
static KeyStore.Builder newInstance (String  type, Provider  provider, KeyStore.ProtectionParameter  protection)
          새로운 Builder 객체를 돌려줍니다.
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

생성자 의 상세

KeyStore.Builder

protected KeyStore.Builder()
새로운 Builder 를 구축합니다.

메소드의 상세

getKeyStore

public abstract KeyStore  getKeyStore()
                              throws KeyStoreException 
이 객체가 기술하는 KeyStore 를 돌려줍니다.

예외:
KeyStoreException - 처리중에 에러가 발생했을 경우 (KeyStore 의 인스턴스화 또는 로드에 실패했을 경우 등)

getProtectionParameter

public abstract KeyStore.ProtectionParameter  getProtectionParameter(String  alias)
                                                             throws KeyStoreException 
지정된 별명 Entry 를 취득할 때에 사용해야 할 ProtectionParameter 를 돌려줍니다. getKeyStore 메소드를 호출한 후에 없으면 이 메소드를 호출할 수 없습니다.

파라미터:
alias - KeyStore 엔트리의 별명
반환값:
지정된 별명 Entry 를 취득할 때에 사용해야 할 ProtectionParameter
예외:
NullPointerException - alias 가 null 인 경우
KeyStoreException - 처리중에 에러가 발생했을 경우
IllegalStateException - 이 메소드를 호출하기 전에 getKeyStore 메소드를 호출하지 않은 경우

newInstance

public static KeyStore.Builder  newInstance(KeyStore  keyStore,
                                           KeyStore.ProtectionParameter  protectionParameter)
지정된 KeyStore 를 캡슐화하는 새로운 Builder 를 돌려줍니다. 반환된 객체의 getKeyStore() 메소드를 호출하면(자),keyStore 가 돌려주어집니다. getProtectionParameter() 메소드로부터는 protectionParameter 가 돌려주어집니다.

이 메소드는, Builder 베이스의 API 로 기존의 KeyStore 객체를 사용할 필요가 있는 경우에 편리합니다.

파라미터:
keyStore - 캡슐화하는 KeyStore
protectionParameter - KeyStore 엔트리의 보호에 사용하는 ProtectionParameter
반환값:
새로운 Builder 객체
예외:
NullPointerException - keyStore 또는 protectionParameter 중 한쪽이 null 인 경우
IllegalArgumentException - keyStore 가 초기화되어 있지 않은 경우

newInstance

public static KeyStore.Builder  newInstance(String  type,
                                           Provider  provider,
                                           File  file,
                                           KeyStore.ProtectionParameter  protection)
새로운 Builder 객체를 돌려줍니다.

반환된 빌더상에서의 첫회의 getKeyStore() 메소드 호출에서는,type 형의 KeyStore 가 작성되는 것과 동시에, 그 load() 메소드가 불려 갑니다. inputStream 인수는 file 에 근거해 구축됩니다. protectionPasswordProtection 인 경우, 패스워드를 가져오려면 getPassword 메소드를 호출합니다. protectionCallbackHandlerProtection 인 경우, 패스워드를 가져오려면 CallbackHandler 를 호출합니다.

후속의 getKeyStore() 호출에서는, 첫회의 호출시와 같은 객체가 돌려주어집니다. 첫회의 호출이 KeyStoreException 로 실패했을 경우, 후속의 호출에서도 KeyStoreException 가 throw 됩니다.

provider 가 null 가 아닌 경우, 그 프로바이더로부터 KeyStore 가 인스턴스화 됩니다. 그렇지 않은 경우는, 인스톨 된 모든 프로바이더가 검색됩니다.

getProtectionParameter() 를 호출하면(자),load 메소드의 호출시에 사용된 패스워드를 캡슐화한 PasswordProtection 객체가 돌려주어집니다.

getKeyStore() 메소드는, 이 메소드를 호출하고 있는 코드 AccessControlContext 내에서 실행되는 것에 주의해 주세요.

파라미터:
type - 구축하는 KeyStore 의 형태
provider - KeyStore 를 인스턴스화할 때의 기가 되는 프로바이더 또는 null
file - KeyStore 데이터가 포함된 File
protection - KeyStore 데이터를 보호하는 ProtectionParameter
반환값:
새로운 Builder 객체
예외:
NullPointerException - type, file, 또는 protection 중 한쪽이 null 인 경우
IllegalArgumentException - protection 가 PasswordProtection, CallbackHandlerProtection 의 어느 쪽의 인스턴스도 아닌 경우, 또는 file 가 존재하지 않는지, 일반적으로의 파일을 참조하고 있지 않는 경우

newInstance

public static KeyStore.Builder  newInstance(String  type,
                                           Provider  provider,
                                           KeyStore.ProtectionParameter  protection)
새로운 Builder 객체를 돌려줍니다.

반환된 빌더상에서 getKeyStore() 메소드를 호출할 때마다, 형태 type 의 새로운 KeyStore 객체가 돌려주어집니다. 그 load() 메소드는,protection 을 캡슐화한 LoadStoreParameter 를 사용해 불려 갑니다.

provider 가 null 가 아닌 경우, 그 프로바이더로부터 KeyStore 가 인스턴스화 됩니다. 그렇지 않은 경우는, 인스톨 된 모든 프로바이더가 검색됩니다.

getProtectionParameter() 를 호출하면(자),protection 가 돌려주어집니다.

getKeyStore() 메소드는, 이 메소드를 호출하고 있는 코드 AccessControlContext 내에서 실행되는 것에 주의해 주세요.

파라미터:
type - 구축하는 KeyStore 의 형태
provider - KeyStore 를 인스턴스화할 때의 기가 되는 프로바이더 또는 null
protection - 키스토어를 보호하는 ProtectionParameter
반환값:
새로운 Builder 객체
예외:
NullPointerException - type, protection 중 한쪽이 null 인 경우

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.