Java URLConnection .setDefaultAllowUserInteraction (boolean defaultallowuserinteraction)

Syntax

URLConnection.setDefaultAllowUserInteraction(boolean defaultallowuserinteraction) has the following syntax.

public static void setDefaultAllowUserInteraction(boolean defaultallowuserinteraction)

Example

In the following code shows how to use URLConnection.setDefaultAllowUserInteraction(boolean defaultallowuserinteraction) method.


import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
//from   w  w w . j  a  va  2  s .  c  o  m
public class Main{
  public static void main(String args[]) throws Exception {
    URL url = new URL("http://www.google.com");
    URLConnection httpCon = (URLConnection) url.openConnection();

    URLConnection.setDefaultAllowUserInteraction(true);


 }
}




















Home »
  Java Tutorial »
    java.net »




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