how to get ip address from string in java