public ServerKey(final InputStream certificateStream) throws InvalidKeystoreException {
  try {
    this.trustStore=keystoreOf(certificateStream);
    certificateStream.close();
  }
 catch (  final CertificateException e) {
    throw new InvalidKeystoreException(e);
  }
catch (  final NoSuchAlgorithmException e) {
    throw new InvalidKeystoreException(e);
  }
catch (  final KeyStoreException e) {
    throw new InvalidKeystoreException(e);
  }
catch (  final IOException e) {
    throw new InvalidKeystoreException(e);
  }
 finally {
    IOUtils.closeQuietly(certificateStream);
  }
}

public ServerKey ( final InputStream certificateStream ) throws InvalidKeystoreException { try { this . trustStore = keystoreOf ( certificateStream ) ; certificateStream . close ( ) ; } catch ( final CertificateException e ) { throw new InvalidKeystoreException ( e ) ; } catch ( final NoSuchAlgorithmException e ) { throw new InvalidKeystoreException ( e ) ; } catch ( final KeyStoreException e ) { throw new InvalidKeystoreException ( e ) ; } catch ( final IOException e ) { throw new InvalidKeystoreException ( e ) ; } finally { IOUtils . closeQuietly ( certificateStream ) ; } }
create new serverkey instance based on data provided in the stream
