Proxy Type() Example
Returns the proxy type.
Proxyclass Type() method example. This example shows you how to use Type() method.This method Returns the proxy type.
Here is the code:-
/*
* @Program that Returns a Type representing the proxy type
* Type.java
* Author:-RoseIndia Team
* Date:-23-Jun-2008
*/
import java.net.*;
public class Type {
public static void main(String[] args) {
SocketAddress ss = new InetSocketAddress("girish-desktop", 8080);
Proxy p = new Proxy(Proxy.Type.SOCKS, ss);
//Returns a Type representing the proxy type
System.out.println("The proxy type is: "+p.type());
}
} |
|