public X509Credential(InputStream certInputStream, InputStream keyInputStream)
     throws CredentialException {
   if (certInputStream.markSupported()) {
     certInputStream.mark(BUFFER_SIZE);
   }
   loadKey(keyInputStream);
   loadCertificate(certInputStream);
   validateCredential();
 }
 public X509Credential(String certFile, String keyFile) throws CredentialException, IOException {
   loadKey(new FileInputStream(new File(keyFile)));
   loadCertificate(new FileInputStream(new File(certFile)));
   validateCredential();
 }