public JKSSignatureToken(InputStream ksStream,String ksPassword){
  try {
    keyStore=KeyStore.getInstance(KeyStore.getDefaultType());
    password=(ksPassword == null) ? null : ksPassword.toCharArray();
    keyStore.load(ksStream,password);
  }
 catch (  Exception e) {
    throw new DSSException(e);
  }
 finally {
    if (ksStream != null) {
      try {
        ksStream.close();
      }
 catch (      IOException e) {
        logger.error(e.getMessage(),e);
      }
    }
  }
}

public JKSSignatureToken ( InputStream ksStream , String ksPassword ) { try { keyStore = KeyStore . getInstance ( KeyStore . getDefaultType ( ) ) ; password = ( ksPassword == null ) ? null : ksPassword . toCharArray ( ) ; keyStore . load ( ksStream , password ) ; } catch ( Exception e ) { throw new DSSException ( e ) ; } finally { if ( ksStream != null ) { try { ksStream . close ( ) ; } catch ( IOException e ) { logger . error ( e . getMessage ( ) , e ) ; } } } }
creates a signaturetokenconnection with the provided inputstream to java keystore file and password .
