/*
(non-Javadoc)
@see javax.servlet.sip.Address#getURI()
336341
public URI getURI() {
		final javax.sip.address.URI localUri = getAddress().getURI();
		if (localUri instanceof javax.sip.address.SipURI)
			return new SipURIImpl((javax.sip.address.SipURI) localUri, isModifiable);
		else if (localUri instanceof javax.sip.address.TelURL)
			return new TelURLImpl((javax.sip.address.TelURL) localUri);
		else if (localUri instanceof javax.sip.address.URI) {			
			URI uri = new GenericURIImpl((javax.sip.address.URI) localUri);
			// setting the value to make sure jain sip runs scheme validation on it
			((Parameterable)uri).setValue(localUri.toString());
			return uri;
		}
		else		
			throw new IllegalArgumentException("unsupported operation - unknown scheme");
	}
616321
@Override
    public void setURI(URI uri) throws URIException {
        // only set the host if specified by the URI
        if (uri.isAbsoluteURI()) {
            this.httphost = new HttpHost(uri);
        }
        // set the path, defaulting to root
        setPath(
            uri.getPath() == null
            ? "/"
            : uri.getEscapedPath()
        );
        setQueryString(uri.getEscapedQuery());
    }
1308827
public static URI getRootUri(final Archive<?> archive) throws IllegalArgumentException {
        if (archive == null) {
            throw new IllegalArgumentException("Archive must be specified");
        }
        final StringBuilder sb = new StringBuilder();
        sb.append(PROTOCOL);
        sb.append(URI_PROTOCOL_SUFFIX);
        sb.append(archive.getId());
        sb.append('/');
        final URI uri = URI.create(sb.toString());
        return uri;
    }
1267292
@CheckReturnValue
  static URI createUri(String scheme, InetAddress address, int port) throws URISyntaxException {
    checkNotNull(address);
    return new URI(
        scheme,
        null /* userInfo */,
        InetAddresses.toUriString(address),
        port,
        null /* path */,
        null /* query */,
        null /* fragment */);
  }
1047707
public URI getURI() {
        final URI locationURI = getClasspathElementURI();
        final String resourcePath = getPathRelativeToClasspathElement();
        final String locationURIStr = locationURI.toString();
        // Check if this is a directory-based module (location URI will end in "/")
        final boolean isDir = locationURIStr.endsWith("/");
        try {
            return new URI((isDir || locationURIStr.startsWith("jar:") ? "" : "jar:") + locationURIStr
                    + (isDir ? "" : "!/") + resourcePath);
        } catch (final URISyntaxException e) {
            throw new IllegalArgumentException("Could not form URL for classpath element: " + locationURIStr
                    + " ; path: " + resourcePath + " : " + e);
        }
    }
375074
public URI getUri(final String name, final URI defaultValue) {
    if (containsKey(name)) {
      return getUri(name);
    } else {
      return defaultValue;
    }
  }
981690
public SipURI createSipURI(String user, String host) {		
		if (logger.isDebugEnabled()) {
			logger.debug("Creating SipURI from USER[" + user + "] HOST[" + host
					+ "]");
		}		
		// Fix for http://code.google.com/p/sipservlets/issues/detail?id=145
		if(user != null && user.trim().isEmpty()) {
			user = null;
		}
		try {
			return new SipURIImpl(SipFactoryImpl.addressFactory.createSipURI(
					user, host), ModifiableRule.Modifiable);
		} catch (ParseException e) {
			logger.error("couldn't parse the SipURI from USER[" + user
					+ "] HOST[" + host + "]", e);
			throw new IllegalArgumentException("Could not create SIP URI user = " + user + " host = " + host);
		}
	}
653473
public SipURI getSipURI(URI uri) {
		javax.sip.address.SipURI jainSipURI = dnsServerLocator.getSipURI(((URIImpl)uri).getURI());
		SipURI sipURI = new SipURIImpl(jainSipURI, ModifiableRule.NotModifiable);
		return sipURI;
	}
339534
@Override
	public <T extends Resource> T get(final String uri) {
		return doRequest(uri).get();
	}
1041913
public static String getRequestURI(final HttpServletRequest request) {
		return (String) request.getSession(true).getAttribute(STORE_URI_KEY);
	}
1151178
protected URI createUri(FileStatus i, UnixUserGroupInformation ugi,
      ClientProtocol nnproxy, HttpServletRequest request)
      throws IOException, URISyntaxException {
    return createUri(i.getPath().toString(),
        pickSrcDatanode(i, nnproxy), ugi, request);
  }
1352227
@Override
	protected URI initURI() {
		try {
			Item item = hman.loc.best();
			if(item!=null) {
				return hman.loc.get(item);
			}
		} catch (LocatorException e) {
			access.log(e, "Error in AAFConHttp obtaining initial URI");
		}
		return null;
	}
1214223
public URI getUri(final String name, final String defaultValue) {
    try {
      return getUri(name, new URI(defaultValue));
    } catch (final URISyntaxException e) {
      throw new IllegalArgumentException(e.getMessage());
    }
  }
1275010
public static Uri getUri(Context context, File file) {
        if (file != null) {
            return FileProvider.getUriForFile(context, FILE_PROVIDER_AUTHORITY, file);
            //Uri.fromFile(file);
        }
        return null;
    }
929493
public static URI getRequestURI(HttpRequestMessage request, IoSession session) {
        URI requestURI = request.getRequestURI();
        String host = request.getHeader("Host");
        return getRequestURI(requestURI, host, session);
    }
670313
public String getEncodedRequestURI()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // 321485
        String uri = null;
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getEncodedRequestURI", "");
        }
        if (getDispatchContext() == null)
            uri = _request.getRequestURI();
        else
            uri = getDispatchContext().getRequestURI();
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getEncodedRequestURI", " uri --> " + uri);
        }

        return uri;
    }
1250676
public static URI getLocalBaseURI() {
    InetAddress localAddr;
    String addr;
    try {
      localAddr = InetAddress.getLocalHost();
      addr = localAddr.getHostAddress();
    } catch (UnknownHostException e) {
      LOGGER.warn("Issues finding ip address of locahost.  Using string 'localhost' for listener address binding");
      addr = "localhost";
    }
    return UriBuilder.fromUri("http://" + addr + "/").port(DEFAULT_PORT).build();
  }