com.eurotech.framework.core.net.util
Class NetworkUtil

java.lang.Object
  extended by com.eurotech.framework.core.net.util.NetworkUtil

public class NetworkUtil
extends Object


Constructor Summary
NetworkUtil()
           
 
Method Summary
static String calculateBroadcast(String ipAddress, String netmask)
           
static String calculateNetwork(String ipAddress, String netmask)
           
static int convertIp4Address(String ipAddress)
           
static String convertIP6Address(byte[] bytes)
           
static byte[] convertIP6Address(String fullFormIP6Address)
           
static String dottedQuad(int ip)
           
static short getNetmaskShortForm(String netmask)
           
static String getNetmaskStringForm(int prefix)
           
static byte[] macToBytes(String mac)
           
static String macToString(byte[] mac)
           
static int packIp4AddressBytes(short[] bytes)
           
static short[] unpackIP4AddressInt(int address)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkUtil

public NetworkUtil()
Method Detail

calculateNetwork

public static String calculateNetwork(String ipAddress,
                                      String netmask)

calculateBroadcast

public static String calculateBroadcast(String ipAddress,
                                        String netmask)

getNetmaskStringForm

public static String getNetmaskStringForm(int prefix)
                                   throws EsfException
Throws:
EsfException

getNetmaskShortForm

public static short getNetmaskShortForm(String netmask)
                                 throws EsfException
Throws:
EsfException

dottedQuad

public static String dottedQuad(int ip)

convertIp4Address

public static int convertIp4Address(String ipAddress)

packIp4AddressBytes

public static int packIp4AddressBytes(short[] bytes)

unpackIP4AddressInt

public static short[] unpackIP4AddressInt(int address)

convertIP6Address

public static byte[] convertIP6Address(String fullFormIP6Address)

convertIP6Address

public static String convertIP6Address(byte[] bytes)

macToString

public static String macToString(byte[] mac)

macToBytes

public static byte[] macToBytes(String mac)


Copyright © 2013. All Rights Reserved.