Java InetAddress Create getInetAddressFromConfigString( String fixedDeviceConfigSring)

Here you can find the source of getInetAddressFromConfigString( String fixedDeviceConfigSring)

Description

Retrieve the InetAddress out of a fixedDeviceConfigSring.

License

Open Source License

Parameter

Parameter Description
fixedDeviceConfigSring extracts the InetAddress from an ethernet fixedDeviceConfigSring

Exception

Parameter Description

Return

the beaconPort

Declaration

public static InetAddress getInetAddressFromConfigString(
        String fixedDeviceConfigSring) throws UnknownHostException 

Method Source Code

//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]);
    }
}

Related

  1. getInetAddressByName(String name)
  2. getInetAddresses()
  3. getInetAddresses(String filter)
  4. getInetAddressFor(final Inet6Address inetAddress, String scope)
  5. getInetAddressFromAsciiIP(String ip)
  6. getInetAddressFromString(String s)
  7. getInetAddressMap()
  8. getInetAddressMap()
  9. getInt32FromAddress(Inet4Address inetAddress)