@Test public void testCreateClassPathResourceThatDoNotExist() throws Exception { final ClassPathResource classPathResource = new ClassPathResource(NON_EXISITING_CLASSPATH_RESOURCE); assertFalse(classPathResource.exists()); }
@Override public boolean exists() { InputStream is = getInputStream(); boolean result = is != null; try{ if (is != null) { is.close(); } } catch (Exception e) { } return result; }
ClassPathResource extends Resource { @Override public boolean exists() { InputStream is = getInputStream(); boolean result = is != null; try{ if (is != null) { is.close(); } } catch (Exception e) { } return result; } }
ClassPathResource extends Resource { @Override public boolean exists() { InputStream is = getInputStream(); boolean result = is != null; try{ if (is != null) { is.close(); } } catch (Exception e) { } return result; } ClassPathResource(String path); }
ClassPathResource extends Resource { @Override public boolean exists() { InputStream is = getInputStream(); boolean result = is != null; try{ if (is != null) { is.close(); } } catch (Exception e) { } return result; } ClassPathResource(String path); @Override InputStream getInputStream(); @Override boolean exists(); }
ClassPathResource extends Resource { @Override public boolean exists() { InputStream is = getInputStream(); boolean result = is != null; try{ if (is != null) { is.close(); } } catch (Exception e) { } return result; } ClassPathResource(String path); @Override InputStream getInputStream(); @Override boolean exists();  }