public static String [ ] getFirstLocatorFromLocatorsString ( String locatorsString ) { if ( locatorsString == null || locatorsString . length ( ) == 0 ) { return new String [ 2 ] ; } String [ ] firstLocator = new String [ 2 ] ; firstLocator [ 0 ] = locatorsString . substring ( 0 , locatorsString . indexOf ( ' ' ) ) . trim ( ) ; locatorsString = locatorsString . substring ( locatorsString . indexOf ( ' ' ) + 1 ) ; firstLocator [ 1 ] = locatorsString . substring ( 0 , locatorsString . indexOf ( ' ' ) ) ; return firstLocator ; }
Returns first locator host and port from locators string .