private void throwPrintToFile(){
  SecurityManager security=System.getSecurityManager();
  if (security != null) {
    if (printToFilePermission == null) {
      printToFilePermission=new FilePermission("<<ALL FILES>>","read,write");
    }
    security.checkPermission(printToFilePermission);
  }
}

private void throwPrintToFile ( ) { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { if ( printToFilePermission == null ) { printToFilePermission = new FilePermission ( "<<ALL FILES>>" , "read,write" ) ; } security . checkPermission ( printToFilePermission ) ; } }
break this out as it may be useful when we allow api to specify printing to a file . in that case its probably right to throw a securityexception if the permission is not granted .
