Here you can find the source of getTargetInetaddress(String target)
public static InetAddress getTargetInetaddress(String target)
//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; } }