Android examples for java.net:IP Address
is Valid Udp Or Tcp Port
import android.system.OsConstants; import android.system.OsConstants; import java.net.Inet6Address; import java.net.InetAddress; import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ShortBuffer; public class Main{ public static boolean isValidUdpOrTcpPort(int port) { return port > 0 && port < 65536; }//ww w . ja v a 2s . c o m }