public static String decodeEndpointURI(String endpoint){
  int ind=endpoint.indexOf('[');
  if (ind == 0) {
    return null;
  }
 else   if (ind != -1) {
    return endpoint.substring(0,ind);
  }
  return endpoint;
}

public static String decodeEndpointURI ( String endpoint ) { int ind = endpoint . indexOf ( '[' ) ; if ( ind == 0 ) { return null ; } else if ( ind != - 1 ) { return endpoint . substring ( 0 , ind ) ; } return endpoint ; }
this method returns the uri part of the supplied endpoint .
