FileDocCategorySizeDatePackage
SecurityManagerTest.javaAPI DocExample762Tue Dec 12 18:57:44 GMT 2000None

SecurityManagerTest

public class SecurityManagerTest extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


        BufferedReader buffy = new BufferedReader(
				   new InputStreamReader(System.in));

        try {
            System.setSecurityManager(
			new PasswordSecurityManager("Booga Booga", buffy));
        } catch (SecurityException se) {
            System.err.println("SecurityManager already set!");
        }

        BufferedReader in = new BufferedReader(new FileReader("inputtext.txt"));
        PrintWriter out = new PrintWriter(new FileWriter("outputtext.txt"));
        String inputString;
        while ((inputString = in.readLine()) != null)
            out.println(inputString);
        in.close();
        out.close();