Java URI to extractForwardURIFrom(URI requestURI)

Here you can find the source of extractForwardURIFrom(URI requestURI)

Description

If no forward URI is given then return null.

License

Apache License

Parameter

Parameter Description
requestURI a parameter

Declaration

public static URI extractForwardURIFrom(URI requestURI) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.URI;

public class Main {
    /**//from   ww  w .ja v a 2s  . c o m
     * If no forward URI is given then return null.
     * @param requestURI
     * @return
     */
    public static URI extractForwardURIFrom(URI requestURI) {
        // http://localhost:8888http://boldapp26.dev.bol.com:9998/testspecs
        int http = requestURI.toString().indexOf("http", 4);
        if (http == -1)
            return null;
        return URI.create(requestURI.toString().substring(http));
    }
}

Related

  1. convertToAbsPath(URI baseURI, String path)
  2. convertToEncodedURIString(String input)
  3. extractBaseUriFromRDF(String rdfString)
  4. extractContentDigest(URI contentDigest)
  5. extractFromURIParams(String paramsRule, String uri)
  6. extractHostAddress(String uri)
  7. extractHostname(String uri)
  8. extractLocalName(String uri)