SocketPermission GetActions() Example

returns present actions in the following order: connect, listen, accept, resolve.


SocketPermissionclass GetActions() method example. This example shows you how to use GetActions() method.This method returns present actions in the following order: connect, listen, accept, resolve.

Here is the code:-

/**
 * @Program that Returns the canonical string representation of the actions.
 *
GetActions.java 
 * Author:-RoseIndia Team
 * Date:-27-jun-2008
 */
import java.net.*;
import java.io.*;
import java.util.*;

public class GetActions {
 public static void main(String[] argsthrows Exception {
        String host = "www.catalog.com";
        String action = "connect";
        SocketPermission permission = new SocketPermission(host, action);
       //Returns the canonical string representation of the actions.
        String s=permission.getActions();
        System.out.println("String representation of the actions are : "+s);
    }
}

Output of the program:-
 String representation of the actions are : connect,resolve

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

HOME | COPYRIGHT | CONTACT US