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());
    }
}

Output of the program:-
 The proxy type is: SOCKS

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US