/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }
/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Gets a list of all network interfaces available on the local system or * {@code null} if no interface is available. * * @return the list of {@code NetworkInterface} instances representing the * available interfaces. * @throws SocketException * if an error occurs while getting the network interface * information. */ public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException { return Collections.enumeration(getNetworkInterfacesList()); }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }
/** * Returns the {@code NetworkInterface} corresponding to the given address, or null if no * interface has this address. * * @throws SocketException if an error occurs. * @throws NullPointerException if {@code address == null}. */ public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException { if (address == null) { throw new NullPointerException("address == null"); } for (NetworkInterface networkInterface : getNetworkInterfacesList()) { if (networkInterface.addresses.contains(address)) { return networkInterface; } } return null; }