An IPv4 can have more representations: as string (a.b.c.d) or numerical (as an unsigned int of 32 bits). (Maybe other, but I will ignore them.)
Is there any
The can be done using InetAddress as follows.
//Converts a String that represents an IP to an int.
InetAddress i= InetAddress.getByName(IPString);
int intRepresentation= ByteBuffer.wrap(i.getAddress()).getInt();
//This convert an int representation of ip back to String
i= InetAddress.getByName(String.valueOf(intRepresentation));
String ip= i.getHostAddress();