@Test public void checkThatFileResourceExists() throws Exception { final FileResource nonExisting = new FileResource("devNullFile"); assertFalse(nonExisting.exists()); final File file = new File(getClass().getResource("/cache1.ini").toURI()); assertTrue(file.exists()); final FileResource existing = new FileResource(file.toURI().toString()); assertTrue(existing.exists()); }
@Override public boolean exists() { return new File(extractFileNameFromFileResource(path)).exists(); }
FileResource extends Resource { @Override public boolean exists() { return new File(extractFileNameFromFileResource(path)).exists(); } }
FileResource extends Resource { @Override public boolean exists() { return new File(extractFileNameFromFileResource(path)).exists(); } FileResource(String path); }
FileResource extends Resource { @Override public boolean exists() { return new File(extractFileNameFromFileResource(path)).exists(); } FileResource(String path); @Override boolean exists(); @Override InputStream getInputStream(); }
FileResource extends Resource { @Override public boolean exists() { return new File(extractFileNameFromFileResource(path)).exists(); } FileResource(String path); @Override boolean exists(); @Override InputStream getInputStream();  }