@Override public Resource createRelative(String relativePath) throws MalformedURLException { if (relativePath.startsWith("/")) { relativePath = relativePath.substring(1); } return new FileUrlResource(new URL(getURL(), relativePath)); }
@Override public boolean isWritable() { try { URL url = getURL(); if (ResourceUtils.isFileURL(url)) { // Proceed with file system resolution File file = getFile(); return (file.canWrite() && !file.isDirectory()); } else { return true; } } catch (IOException ex) { return false; } }
@Override public Resource createRelative(String relativePath) throws MalformedURLException { if (relativePath.startsWith("/")) { relativePath = relativePath.substring(1); } return new FileUrlResource(new URL(getURL(), relativePath)); }
@Override public boolean isWritable() { try { URL url = getURL(); if (ResourceUtils.isFileURL(url)) { // Proceed with file system resolution File file = getFile(); return (file.canWrite() && !file.isDirectory()); } else { return true; } } catch (IOException ex) { return false; } }
@Override public Resource createRelative(String relativePath) throws MalformedURLException { if (relativePath.startsWith("/")) { relativePath = relativePath.substring(1); } return new FileUrlResource(new URL(getURL(), relativePath)); }
@Override public Resource createRelative(String relativePath) throws MalformedURLException { if (relativePath.startsWith("/")) { relativePath = relativePath.substring(1); } return new FileUrlResource(new URL(getURL(), relativePath)); }
@Override public boolean isWritable() { try { URL url = getURL(); if (ResourceUtils.isFileURL(url)) { // Proceed with file system resolution File file = getFile(); return (file.canWrite() && !file.isDirectory()); } else { return true; } } catch (IOException ex) { return false; } }
@Override public boolean isWritable() { try { URL url = getURL(); if (ResourceUtils.isFileURL(url)) { // Proceed with file system resolution File file = getFile(); return (file.canWrite() && !file.isDirectory()); } else { return true; } } catch (IOException ex) { return false; } }