/** * Builds a new cache. * * @param directory a non null File pointing to an existing directory * @throws IOException */ DirectoryTypeCache(File directory, FileStoreFactory factory) throws IOException { // some basic checks if (directory == null) throw new NullPointerException("Directory parameter should be not null"); if (!directory.exists()) { throw new IllegalArgumentException( "Specified directory does not exists: " + directory.getAbsolutePath()); } if (!directory.isDirectory()) { throw new IllegalArgumentException( "Specified path is not a directory, it'a s file instead: " + directory.getAbsolutePath()); } this.directory = directory; this.factory = factory; this.watcher = new ImmediateDirectoryWatcher(directory); }
/** * Builds a new cache. * * @param directory * a non null File pointing to an existing directory * @throws IOException */ DirectoryTypeCache(File directory, URI namespaceURI) throws IOException { // some basic checks if (directory == null) throw new NullPointerException( "Directory parameter should be not null"); if (!directory.exists()) { throw new IllegalArgumentException( "Specified directory does not exists: " + directory.getAbsolutePath()); } if (!directory.isDirectory()) { throw new IllegalArgumentException( "Specified path is not a directory, it'a s file instead: " + directory.getAbsolutePath()); } this.directory = directory; this.namespaceURI = namespaceURI; this.watcher = new ImmediateDirectoryWatcher(directory); }
/** * Builds a new cache. * * @param directory * a non null File pointing to an existing directory * @throws IOException */ DirectoryTypeCache(File directory, FileStoreFactory factory) throws IOException { // some basic checks if (directory == null) throw new NullPointerException( "Directory parameter should be not null"); if (!directory.exists()) { throw new IllegalArgumentException( "Specified directory does not exists: " + directory.getAbsolutePath()); } if (!directory.isDirectory()) { throw new IllegalArgumentException( "Specified path is not a directory, it'a s file instead: " + directory.getAbsolutePath()); } this.directory = directory; this.factory = factory; this.watcher = new ImmediateDirectoryWatcher(directory); }