URI IsOpaque() Example
Tells whether or not this URI is opaque.
URIclass IsOpaque() method example. This example shows you how to use IsOpaque() method.This method
Tells whether or not this URI is opaque.
Here is the code:-
/**
* @Program that Tells whether or not this URI is opaque.
* IsOpaque.java
* Author:-RoseIndia Team
* Date:-24-jun-2008
*/
import java.net.*;
public class IsOpaque {
public static void main(String[] args) throws Exception {
String scheme = "http";
String userInfo = "girish";
String host = "tewari.com";
int port = 8080;
String path = "/mail/";
String query = "open";
String fragment = "inbox";
URI uri = new URI(scheme, userInfo, host, port, path, query, fragment);
System.out.println("Given uri is: " + uri);
//Tells whether or not this URI is opaque.
System.out.println("Given URI is opaque is: " + uri.isOpaque());
}
} |
Output of the program:-
Given uri is: http://girish@tewari.com:8080/mail/?open#inbox
Given URI is opaque is: false |
|