public class Ipify
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getPublicIp()
Gets the public ip address through ipify's api.
|
static java.lang.String |
getPublicIp(boolean useHttps)
Gets the public ip address through ipify's api.
|
public static java.lang.String getPublicIp() throws java.io.IOException
java.io.IOException
- If there is an IO error.public static java.lang.String getPublicIp(boolean useHttps) throws java.io.IOException
useHttps
- If true, will use an https connection. If false, will use http.java.io.IOException
- If there is an IO error.