ValidityTools { public static int getPortNumber ( String hostandport ) { int port = -1; try { Matcher m = hostAndPortPattern.matcher(hostandport); m.matches(); port = Integer.parseInt( m.group( 2 ).toLowerCase( ).trim( ) ); } catch ( Exception e ) {} return port; }  static boolean isAccessibleSocket( String host , int port ); static boolean isAccessibleSocket( String host , int port, int timeOutInMSec ); static void checkAccessibilityOfDirs( String ... args ); static void checkAccessibilityOfFiles( String... args ); static void isDBAccessible( String driverClass , String url , String user , String password ); static String getHostName( String hostandport ); static int getPortNumber( String hostandport ); static boolean isLocalhost( String host ); static boolean isInt( String value ); static boolean isValidJavaVariable(CharSequence string); static final int SMTP_PORT; static final transient Logger logger; static final ArrayList < InetAddress > NETWORK_LOCAL_INETADDRESSES; }
@Test public void testGetPortNumber() { }