public File getFile() { if (!_iterated) throw new IllegalStateException(); if (_url == null) return null; File file = new File(URLDecoder.decode(_url.getPath())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode((_urls.get(_url)).getFile())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode(((URL) _urls.get(_url)). getFile())); return (((Boolean) AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file :null; }
public File getFile() { if (!_iterated) throw new IllegalStateException(); if (_url == null) return null; File file = new File(URLDecoder.decode(_url.getPath())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() { if (!_iterated) throw new IllegalStateException(); if (_url == null) return null; File file = new File(URLDecoder.decode(_url.getPath())); return (((Boolean) AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode((_urls.get(_url)).getFile())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file :null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode((_urls.get(_url)).getFile())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() { if (!_iterated) throw new IllegalStateException(); if (_url == null) return null; File file = new File(URLDecoder.decode(_url.getPath())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode((_urls.get(_url)).getFile())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file :null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode(((URL) _urls.get(_url)). getFile())); return (((Boolean) AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode((_urls.get(_url)).getFile())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file:null; }
public File getFile() throws IOException { if (_url == -1 || _url >= _urls.size()) throw new IllegalStateException(); File file = new File(URLDecoder.decode((_urls.get(_url)).getFile())); return ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) ? file :null; }
/** * Set of semicolon-separated {@link File}s of metadata files or * directories supplied by user via auto-configuration. */ public void setFiles(String files) { if (StringUtils.isEmpty(files)) this.files = null; else { String[] strs = Strings.split(files, ";", 0); this.files = new HashSet<File>((int) (strs.length * 1.33 + 1)); File file; for (int i = 0; i < strs.length; i++) { file = new File(strs[i]); if ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) this.files.add(file); } } }
/** * Prepare to write to the given file. Back up the file and make sure the * path to it is created. */ protected File prepareWrite(File file) throws IOException { File backup = Files.backup(file, false); if (backup == null) { File parent = file.getParentFile(); if (parent != null && !(AccessController.doPrivileged( J2DoPrivHelper.existsAction(parent))).booleanValue()) AccessController.doPrivileged( J2DoPrivHelper.mkdirsAction(parent)); } return backup; }
/** * Prepare to write to the given file. Back up the file and make sure the * path to it is created. */ protected File prepareWrite(File file) throws IOException { File backup = Files.backup(file, false); if (backup == null) { File parent = file.getParentFile(); if (parent != null && !(AccessController.doPrivileged( J2DoPrivHelper.existsAction(parent))).booleanValue()) AccessController.doPrivileged( J2DoPrivHelper.mkdirsAction(parent)); } return backup; }
/** * Prepare to write to the given file. Back up the file and make sure the * path to it is created. */ protected File prepareWrite(File file) throws IOException { File backup = Files.backup(file, false); if (backup == null) { File parent = file.getParentFile(); if (parent != null && !((Boolean) AccessController.doPrivileged( J2DoPrivHelper.existsAction(parent))).booleanValue()) AccessController.doPrivileged( J2DoPrivHelper.mkdirsAction(parent)); } return backup; }
/** * Prepare to write to the given file. Back up the file and make sure the * path to it is created. */ protected File prepareWrite(File file) throws IOException { File backup = Files.backup(file, false); if (backup == null) { File parent = file.getParentFile(); if (parent != null && !(AccessController.doPrivileged( J2DoPrivHelper.existsAction(parent))).booleanValue()) AccessController.doPrivileged( J2DoPrivHelper.mkdirsAction(parent)); } return backup; }
/** * Look for META-INF/orm.xml, and if it doesn't exist, choose a default. */ private File defaultXMLFile() { ClassLoader loader = repos.getConfiguration(). getClassResolverInstance().getClassLoader(getClass(), null); URL rsrc = AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(loader, "META-INF/orm.xml")); if (rsrc != null) { File file = new File(rsrc.getFile()); if ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) return file; } return new File(dir, "orm.xml"); }
/** * Look for META-INF/orm.xml, and if it doesn't exist, choose a default. */ private File defaultXMLFile() { ClassLoader loader = repos.getConfiguration(). getClassResolverInstance().getClassLoader(getClass(), null); URL rsrc = AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(loader, "META-INF/orm.xml")); if (rsrc != null) { File file = new File(rsrc.getFile()); if ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) return file; } return new File(dir, "orm.xml"); }
/** * Look for META-INF/orm.xml, and if it doesn't exist, choose a default. */ private File defaultXMLFile() { ClassLoader loader = repos.getConfiguration(). getClassResolverInstance().getClassLoader(getClass(), null); URL rsrc = AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(loader, "META-INF/orm.xml")); if (rsrc != null) { File file = new File(rsrc.getFile()); if ((AccessController.doPrivileged( J2DoPrivHelper.existsAction(file))).booleanValue()) return file; } return new File(dir, "orm.xml"); }