SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkRead(file); } filename = file;
SecurityManager security = System.getSecurityManager(); if (security != null) { try { security.checkRead(filename); } catch (SecurityException e) { return false; } } return true;
try { // BEGIN android-modified return new BufferedInputStream(new FileInputStream(filename), 8192); // END android-modified } catch (FileNotFoundException e) { return null; }