@Test public void findOrCreateCacheFile() { CachingXmlDataStore.findOrCreateCacheFile().delete(); File temp = CachingXmlDataStore.findOrCreateCacheFile(); assertThat(temp.exists()).isTrue(); temp = CachingXmlDataStore.findOrCreateCacheFile(); assertThat(temp.exists()).isTrue(); temp = CachingXmlDataStore.findOrCreateCacheFile(); assertThat(temp.exists()).isTrue(); temp.delete(); assertThat(temp.exists()).isFalse(); }
@Nonnull public static File findOrCreateCacheFile() { final File file = new File(CACHE_DIR, PREFIX + SUFFIX); if (!file.exists()) { try { file.createNewFile(); } catch (final IOException e) { throw new IllegalStateOfArgumentException("Can not create a cache file.", e); } } return file; }
CachingXmlDataStore extends AbstractRefreshableDataStore { @Nonnull public static File findOrCreateCacheFile() { final File file = new File(CACHE_DIR, PREFIX + SUFFIX); if (!file.exists()) { try { file.createNewFile(); } catch (final IOException e) { throw new IllegalStateOfArgumentException("Can not create a cache file.", e); } } return file; } }
CachingXmlDataStore extends AbstractRefreshableDataStore { @Nonnull public static File findOrCreateCacheFile() { final File file = new File(CACHE_DIR, PREFIX + SUFFIX); if (!file.exists()) { try { file.createNewFile(); } catch (final IOException e) { throw new IllegalStateOfArgumentException("Can not create a cache file.", e); } } return file; } private  CachingXmlDataStore(@Nonnull final DataReader reader, @Nonnull final URL dataUrl, @Nonnull final URL versionUrl,
			@Nonnull final Charset charset, @Nonnull final File cacheFile, @Nonnull final DataStore fallback); }
CachingXmlDataStore extends AbstractRefreshableDataStore { @Nonnull public static File findOrCreateCacheFile() { final File file = new File(CACHE_DIR, PREFIX + SUFFIX); if (!file.exists()) { try { file.createNewFile(); } catch (final IOException e) { throw new IllegalStateOfArgumentException("Can not create a cache file.", e); } } return file; } private  CachingXmlDataStore(@Nonnull final DataReader reader, @Nonnull final URL dataUrl, @Nonnull final URL versionUrl,
			@Nonnull final Charset charset, @Nonnull final File cacheFile, @Nonnull final DataStore fallback); @Nonnull static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final URL dataUrl, @Nonnull final URL versionURL, @Nonnull final DataStore fallback); @Deprecated static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final DataStore fallback); @Nonnull @Deprecated static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final DataStore fallback); @Nonnull static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final URL dataUrl,
			@Nonnull final URL versionUrl, @Nonnull final Charset charset, @Nonnull final DataStore fallback); @Nonnull static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final URL dataUrl, @Nonnull final URL versionUrl,
			@Nonnull final Charset charset, @Nonnull final DataStore fallback); @Nonnull static File findOrCreateCacheFile(); }
CachingXmlDataStore extends AbstractRefreshableDataStore { @Nonnull public static File findOrCreateCacheFile() { final File file = new File(CACHE_DIR, PREFIX + SUFFIX); if (!file.exists()) { try { file.createNewFile(); } catch (final IOException e) { throw new IllegalStateOfArgumentException("Can not create a cache file.", e); } } return file; } private  CachingXmlDataStore(@Nonnull final DataReader reader, @Nonnull final URL dataUrl, @Nonnull final URL versionUrl,
			@Nonnull final Charset charset, @Nonnull final File cacheFile, @Nonnull final DataStore fallback); @Nonnull static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final URL dataUrl, @Nonnull final URL versionURL, @Nonnull final DataStore fallback); @Deprecated static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final DataStore fallback); @Nonnull @Deprecated static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final DataStore fallback); @Nonnull static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final URL dataUrl,
			@Nonnull final URL versionUrl, @Nonnull final Charset charset, @Nonnull final DataStore fallback); @Nonnull static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final URL dataUrl, @Nonnull final URL versionUrl,
			@Nonnull final Charset charset, @Nonnull final DataStore fallback); @Nonnull static File findOrCreateCacheFile();  }