friends,

i have written a java code that retrieve the reachable machine on a network through looping the IP. but i want to retrieve the Active User name on that IP.
i am not getting the concept how can i retrieve it.

here is the code snnipet:
// Code goes here


public static void main(String[] args) {

InetAddress localhost = InetAddress.getLocalHost();

byte[] ip = localhost.getAddress();

for (int i = 50; i <= 50; i++)
{
ip[2] = (byte)i;
for(int j=1;j<=255;j++)
{
ip[3]=(byte)j;

InetAddress address = InetAddress.getByAddress(ip);

if (address.isReachable(1000))
{
System.out.println(address + " machine is turned on and can be pinged");
}
else
{
System.out.println(address + "the host name could not be resolved");
}
}
}
}

Please help me to find the active user name according to IP detected.