@Test public void getLengthIOException () throws Exception { doThrow(new IOException()).when(resource).contentLength(); assertEquals(0, jarResourceFile.getLength()); }
@Override public long getLength() { try { return resource.contentLength(); } catch (IOException e) { log.error("Cannot evaluate resource file {} content length",resource.getFilename(),e); } return 0; }
JarResourceFile extends FileSystemFile { @Override public long getLength() { try { return resource.contentLength(); } catch (IOException e) { log.error("Cannot evaluate resource file {} content length",resource.getFilename(),e); } return 0; } }
JarResourceFile extends FileSystemFile { @Override public long getLength() { try { return resource.contentLength(); } catch (IOException e) { log.error("Cannot evaluate resource file {} content length",resource.getFilename(),e); } return 0; } JarResourceFile(Resource resource, boolean isExecutable); }
JarResourceFile extends FileSystemFile { @Override public long getLength() { try { return resource.contentLength(); } catch (IOException e) { log.error("Cannot evaluate resource file {} content length",resource.getFilename(),e); } return 0; } JarResourceFile(Resource resource, boolean isExecutable); @Override boolean isFile(); @Override long getLength(); @Override InputStream getInputStream(); @Override long getLastAccessTime(); @Override long getLastModifiedTime(); @Override int getPermissions(); }
JarResourceFile extends FileSystemFile { @Override public long getLength() { try { return resource.contentLength(); } catch (IOException e) { log.error("Cannot evaluate resource file {} content length",resource.getFilename(),e); } return 0; } JarResourceFile(Resource resource, boolean isExecutable); @Override boolean isFile(); @Override long getLength(); @Override InputStream getInputStream(); @Override long getLastAccessTime(); @Override long getLastModifiedTime(); @Override int getPermissions();  }