public static KeyManager[] getKeyManagers(InputStream keyStoreIs, String pass)
	throws InitializationException {
		if (keyStoreIs == null) {
			throw new NullPointerException("KeyStore input stream is null");
		}

		if (pass == null) {
			throw new NullPointerException("KeyStore password is null");
		}

		try {
			String defaultAlgo = KeyManagerFactory.getDefaultAlgorithm();
			KeyManagerFactory kmf = KeyManagerFactory.getInstance(defaultAlgo);
			KeyStore ks = loadKeyStore(keyStoreIs, pass);
			kmf.init(ks, pass.toCharArray());
			return kmf.getKeyManagers();
		} catch (Exception e) {
			throw new InitializationException(e.getMessage());
		}
	}
public static KeyManager [ ] getKeyManagers ( InputStream keyStoreIs , String pass ) throws InitializationException { if ( keyStoreIs == null ) { throw new NullPointerException ( "KeyStore input stream is null" ) ; } if ( pass == null ) { throw new NullPointerException ( "KeyStore password is null" ) ; } try { String defaultAlgo = KeyManagerFactory . getDefaultAlgorithm ( ) ; KeyManagerFactory kmf = KeyManagerFactory . getInstance ( defaultAlgo ) ; KeyStore ks = loadKeyStore ( keyStoreIs , pass ) ; kmf . init ( ks , pass . toCharArray ( ) ) ; return kmf . getKeyManagers ( ) ; } catch ( Exception e ) { throw new InitializationException ( e . getMessage ( ) ) ; } }
Creates {@link KeyManager} instances based on the given parameters.

@param keyStoreIs {@link InputStream} representing contents of a keyStore
@param pass password for the keyStore
@return an array of {@link KeyManager} instances
@throws InitializationException