Java URI.getUserInfo()

Syntax

URI.getUserInfo() has the following syntax.

public String getUserInfo()

Example

In the following code shows how to use URI.getUserInfo() method.


import java.net.URI;
/*from  ww  w. j  a  va  2 s . c  o m*/

public class Main {

  public static void main(String[] args) {
    URI uri = URI.create("http://java2s.com/query.php?name=value");
    System.out.println(uri.getUserInfo());
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.net »




CookieManager
CookiePolicy
CookieStore
DatagramPacket
DatagramSocket
HttpCookie
HttpURLConnection
InetAddress
JarURLConnection
MulticastSocket
ServerSocket
Socket
SocketAddress
URI
URL
URLConnection
URLDecoder
URLEncoder