Java tutorial
import java.io.FilePermission; import java.security.Permission; public class Main { public static void main(String[] argv) throws Exception { Permission perm1 = new FilePermission("/tmp/*", "read,write"); Permission perm2 = new FilePermission("/tmp/abc", "read"); if (perm1.implies(perm2)) { System.out.println("perm1 implies perm2"); } } }