List of usage examples for java.lang SecurityException SecurityException
public SecurityException(Throwable cause)
From source file:YourOwnProvider.java
public static final synchronized void verifyForJCE() { throw new SecurityException("Can't verify for JCE"); }
From source file:Main.java
@Override public void checkAccess(Thread t) { throw new SecurityException("Not allowed."); }
From source file:Main.java
@Override public void checkExit(int status) { throw new SecurityException("Not allowed."); }
From source file:Main.java
@Override public void checkAccess(ThreadGroup a) { throw new SecurityException("Not allowed."); }
From source file:org.globus.gsi.util.FileUtil.java
public static File createFile(String filename) throws IOException { File f = new File(filename); if (!f.createNewFile()) { FileUtils.forceDelete(f);/*w w w . ja va 2 s . c o m*/ if (!f.createNewFile()) { throw new SecurityException("Failed to atomically create new file"); } } return f; }
From source file:CustomSecurityManager.java
public void checkRead(String fileName) { if (fileName != null && fileName.endsWith(".java")) { throw new SecurityException(" You are not allowed to read " + " file names ending with .java"); }//from w w w .j av a 2s . c o m super.checkRead(fileName); }
From source file:com.dgq.utils.EncodeUtils.java
/** * Hex?./*w w w. jav a2s.c om*/ */ public static byte[] decodeHex(String input) { try { return Hex.decodeHex(input.toCharArray()); } catch (DecoderException e) { throw new SecurityException("Hex?!"); } }
From source file:nl.surfnet.coin.teams.util.TokenUtil.java
public static void checkTokens(String sessionToken, String token, SessionStatus status) { if (StringUtils.length(sessionToken) != TOKEN_LENGTH || !(sessionToken.equals(token))) { status.setComplete();// w w w . j av a2 s.co m throw new SecurityException("Token does not match"); } }
From source file:MainClass.java
public void checkRead(String file) { if (!(file.endsWith(".txt")) && !(file.endsWith(".java")) && !(file.endsWith(".class")) && !(file.startsWith("C:\\"))) { throw new SecurityException("No Read Permission for : " + file); }//w w w. jav a2s.c om }
From source file:CustomSecurityManager.java
public void checkWrite(String fileName) { if (fileName != null && fileName.endsWith(".java")) { throw new SecurityException(" You are not allowed to write " + " file names ending with .java"); }/*from w w w. ja v a 2s .co m*/ super.checkWrite(fileName); }