Methods Summary |
---|
private boolean | accessOK()
int c;
DataInputStream in = new DataInputStream(System.in);
String response;
System.out.println("What's the secret password?");
try {
response = in.readLine();
if (response.equals(password))
return true;
else
return false;
} catch (IOException e) {
return false;
}
|
public void | checkRead(java.io.FileDescriptor filedescriptor)
if (!accessOK())
throw new SecurityException("Not a Chance!");
|
public void | checkRead(java.lang.String filename)
if (!accessOK())
throw new SecurityException("No Way!");
|
public void | checkRead(java.lang.String filename, java.lang.Object executionContext)
if (!accessOK())
throw new SecurityException("Forget It!");
|
public void | checkWrite(java.io.FileDescriptor filedescriptor)
if (!accessOK())
throw new SecurityException("Not!");
|
public void | checkWrite(java.lang.String filename)
if (!accessOK())
throw new SecurityException("Not Even!");
|