Android IP Address Get getTargetInetaddress(String target)

Here you can find the source of getTargetInetaddress(String target)

Description

get Target Inetaddress

Declaration

public static InetAddress getTargetInetaddress(String target) 

Method Source Code

//package com.java2s;

import java.net.InetAddress;

import java.net.UnknownHostException;

public class Main {
    public static InetAddress getTargetInetaddress(String target) {
        InetAddress targetInetAddress = null;
        try {//from  www  . jav  a2s. c  o m
            targetInetAddress = InetAddress.getByName(target.trim());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        return targetInetAddress;
    }
}

Related

  1. getLocalIpAddress()
  2. getIPAddress(boolean useIPv4)
  3. getHostAddress(int address)
  4. getLocalHostAddress()
  5. getIPAddress(boolean useIPv4)
  6. getDevicesMac(Context context)
  7. getDevicesIP(Context context)
  8. getIPs()
  9. getIPv4StringByStrippingIPv6Prefix(String in)