import java.net.URI;
import java.net.URISyntaxException;
public class IRIDemo {
public static void main(String[] args) throws NullPointerException, URISyntaxException {
URI uri = new URI("http://r%C3%A9sum%C3%A9.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());
}
}
|