URI: getAuthority() : URI « java.net « Java by API






URI: getAuthority()

  
import java.net.URI;
import java.net.URISyntaxException;

public class Main {
  public static void main(String[] args) throws NullPointerException, URISyntaxException {
    URI uri = new URI("http://www.example.org");
    System.out.println("URI      : " + uri);
    System.out.println("Raw Authority : " + uri.getRawAuthority());
    System.out.println("Raw Fragment : " + uri.getRawFragment());
    System.out.println("Fragment : " + uri.getFragment());
    System.out.println("Authority : " + uri.getAuthority());
    System.out.println("Authority : " + uri.getRawPath());
    System.out.println("RawQuery : " + uri.getRawQuery());
    System.out.println("RawSchemeSpecificPart : " + uri.getRawSchemeSpecificPart());
    System.out.println("RawUserInfo : " + uri.getRawUserInfo());

  }
}

   
    
  








Related examples in the same category

1.URI: getFragment()
2.URI: getRawAuthority()
3.URI: getRawFragment()
4.URI: getRawPath()
5.URI: getRawQuery()
6.URI: getRawSchemeSpecificPart()
7.URI: getRawUserInfo()
8.URI: toURL()