/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol. * * @param protocol * the requested protocol to create a context for. * @return the created {@code SSLContext} instance. * @throws NoSuchAlgorithmException * if no installed provider can provide the requested protocol * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { if (protocol == null) { throw new NullPointerException("protocol == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null); return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }
/** * Creates a new {@code SSLContext} instance for the specified protocol from * the specified provider. * * @param protocol * the requested protocol to create a context for * @param provider * the provider that provides the requested protocol. * @return an {@code SSLContext} for the requested protocol. * @throws NoSuchAlgorithmException * if the specified provider cannot provide the requested * protocol. * @throws NullPointerException * if {@code protocol} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release) */ public static SSLContext getInstance(String protocol, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider is null"); } if (protocol == null) { throw new NullPointerException("protocol == null"); } Object spi = ENGINE.getInstance(protocol, provider, null); return new SSLContext((SSLContextSpi) spi, provider, protocol); }