static URI withoutFragment(final String fullUri){
  int hashmarkIdx=fullUri.indexOf('#');
  String rval;
  if (hashmarkIdx == -1) {
    rval=fullUri;
  }
 else {
    rval=fullUri.substring(0,hashmarkIdx);
  }
  try {
    return new URI(rval);
  }
 catch (  URISyntaxException e) {
    throw new RuntimeException(e);
  }
}

static URI withoutFragment ( final String fullUri ) { int hashmarkIdx = fullUri . indexOf ( '#' ) ; String rval ; if ( hashmarkIdx == - 1 ) { rval = fullUri ; } else { rval = fullUri . substring ( 0 , hashmarkIdx ) ; } try { return new URI ( rval ) ; } catch ( URISyntaxException e ) { throw new RuntimeException ( e ) ; } }
returns the absolute uri without its fragment part .
