Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java inetaddress workaround how to get localhost secure

public static List<InetAddress> getIPAddress() throws SocketException {

    List<InetAddress> ipAddresses = new ArrayList<InetAddress>();
    Enumeration e;
    e = NetworkInterface.getNetworkInterfaces();
    while (e.hasMoreElements()) {
        NetworkInterface ni = (NetworkInterface) e.nextElement();
        if (ni.isLoopback() || !ni.isUp()) continue;

        for (Enumeration e2 = ni.getInetAddresses(); e2.hasMoreElements(); ) {
            InetAddress ip = (InetAddress) e2.nextElement();
            ipAddresses.add(ip);
        }
    }
    return ipAddresses;
}
Comment

PREVIOUS NEXT
Code Example
Java :: popcat 
Java :: if(ResultSet.next()) 
Java :: spring mvc aop transaction management 
Java :: EuclideanAlgorithm in Java 
Java :: Java Multi-catch block 
Java :: compile time exception in java 
Java :: arraylistof objects 
Java :: Append Line Separator In StringBuilder 
Java :: Small Change 
Java :: fibonacci java 
Java :: ferrari class in java 
Java :: spring boot rest api 
Java :: java program for calendar using applet 
Java :: apache poi excel color 
Java :: quadratic program 
Java :: clear array in java 
Java :: how to use int 
Java :: cannot apply java lang integer android 
Java :: setting up javafx in eclipse 
Java :: query spring boot 
Java :: identifier in java 
Java :: arduino convert byte array to string 
Java :: palindrome in java 
Java :: java float precision 
Java :: void setup 
Java :: print outputstream to console java 
Java :: java non-breajubg soace remove 
Sql :: PROSYS SQL BKP 
Sql :: find column in all stored procedures sql server 
Sql :: sql add column after another 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =