/** * Create a new instance using the given {@link SelectorProvider} * which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel(SelectorProvider provider) { this(newSocket(provider)); }
/** * Create a new instance using the given {@link SelectorProvider} and {@link InternetProtocolFamily}. * If {@link InternetProtocolFamily} is {@code null} it will depend on the Operation Systems default * which will be chosen. */ public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) { this(newSocket(provider, ipFamily)); }
/** * Create a new instance which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel() { this(newSocket(DEFAULT_SELECTOR_PROVIDER)); }
/** * Create a new instance using the given {@link InternetProtocolFamily}. If {@code null} is used it will depend * on the Operation Systems default which will be chosen. */ public NioDatagramChannel(InternetProtocolFamily ipFamily) { this(newSocket(DEFAULT_SELECTOR_PROVIDER, ipFamily)); }
/** * Create a new instance using the given {@link InternetProtocolFamily}. If {@code null} is used it will depend * on the Operation Systems default which will be chosen. */ public NioDatagramChannel(InternetProtocolFamily ipFamily) { this(newSocket(DEFAULT_SELECTOR_PROVIDER, ipFamily)); }
/** * Create a new instance using the given {@link SelectorProvider} * which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel(SelectorProvider provider) { this(newSocket(provider)); }
/** * Create a new instance using the given {@link SelectorProvider} and {@link InternetProtocolFamily}. * If {@link InternetProtocolFamily} is {@code null} it will depend on the Operation Systems default * which will be chosen. */ public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) { this(newSocket(provider, ipFamily)); }
/** * Create a new instance which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel() { this(newSocket(DEFAULT_SELECTOR_PROVIDER)); }
/** * Create a new instance using the given {@link InternetProtocolFamily}. If {@code null} is used it will depend * on the Operation Systems default which will be chosen. */ public NioDatagramChannel(InternetProtocolFamily ipFamily) { this(newSocket(DEFAULT_SELECTOR_PROVIDER, ipFamily)); }
/** * Create a new instance using the given {@link SelectorProvider} and {@link InternetProtocolFamily}. * If {@link InternetProtocolFamily} is {@code null} it will depend on the Operation Systems default * which will be chosen. */ public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) { this(newSocket(provider, ipFamily)); }
/** * Create a new instance which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel() { this(newSocket(DEFAULT_SELECTOR_PROVIDER)); }
/** * Create a new instance using the given {@link SelectorProvider} * which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel(SelectorProvider provider) { this(newSocket(provider)); }
private static DatagramChannel newSocket(SelectorProvider provider, InternetProtocolFamily ipFamily) { if (ipFamily == null) { return newSocket(provider); } checkJavaVersion(); try { return provider.openDatagramChannel(ProtocolFamilyConverter.convert(ipFamily)); } catch (IOException e) { throw new ChannelException("Failed to open a socket.", e); } }
private static DatagramChannel newSocket(SelectorProvider provider, InternetProtocolFamily ipFamily) { if (ipFamily == null) { return newSocket(provider); } checkJavaVersion(); try { return provider.openDatagramChannel(ProtocolFamilyConverter.convert(ipFamily)); } catch (IOException e) { throw new ChannelException("Failed to open a socket.", e); } }
private static DatagramChannel newSocket(SelectorProvider provider, InternetProtocolFamily ipFamily) { if (ipFamily == null) { return newSocket(provider); } checkJavaVersion(); try { return provider.openDatagramChannel(ProtocolFamilyConverter.convert(ipFamily)); } catch (IOException e) { throw new ChannelException("Failed to open a socket.", e); } }
/** * Create a new instance using the given {@link SelectorProvider} and {@link InternetProtocolFamily}. * If {@link InternetProtocolFamily} is {@code null} it will depend on the Operation Systems default * which will be chosen. */ public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) { this(newSocket(provider, ipFamily)); }
/** * Create a new instance which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel() { this(newSocket(DEFAULT_SELECTOR_PROVIDER)); }
/** * Create a new instance using the given {@link SelectorProvider} * which will use the Operation Systems default {@link InternetProtocolFamily}. */ public NioDatagramChannel(SelectorProvider provider) { this(newSocket(provider)); }
/** * Create a new instance using the given {@link SelectorProvider} and {@link InternetProtocolFamily}. * If {@link InternetProtocolFamily} is {@code null} it will depend on the Operation Systems default * which will be chosen. */ public NioDatagramChannel(SelectorProvider provider, InternetProtocolFamily ipFamily) { this(newSocket(provider, ipFamily)); }
/** * Create a new instance using the given {@link InternetProtocolFamily}. If {@code null} is used it will depend * on the Operation Systems default which will be chosen. */ public NioDatagramChannel(InternetProtocolFamily ipFamily) { this(newSocket(DEFAULT_SELECTOR_PROVIDER, ipFamily)); }