Here you can find the source of getInetAddressFromConfigString( String fixedDeviceConfigSring)
Parameter | Description |
---|---|
fixedDeviceConfigSring | extracts the InetAddress from an ethernet fixedDeviceConfigSring |
Parameter | Description |
---|
public static InetAddress getInetAddressFromConfigString( String fixedDeviceConfigSring) throws UnknownHostException
//package com.java2s; //License from project: Open Source License import java.net.InetAddress; import java.net.UnknownHostException; public class Main { private static String FIXED_DEVICE_SET_CONFIG_STRING_SEPARATOR = "###"; /**//from w w w .j av a 2 s . co m * Retrieve the InetAddress out of a fixedDeviceConfigSring. * * @param fixedDeviceConfigSring extracts the InetAddress from an ethernet fixedDeviceConfigSring * @return the beaconPort * @throws java.net.UnknownHostException if the host inside the config string is unknown or invalid */ public static InetAddress getInetAddressFromConfigString( String fixedDeviceConfigSring) throws UnknownHostException { String[] splitted = fixedDeviceConfigSring .split(FIXED_DEVICE_SET_CONFIG_STRING_SEPARATOR); return InetAddress.getByName(splitted[0]); } }