@Override public Resource addPath(String path) throws IOException, MalformedURLException { assertValidPath(path); path = org.eclipse.jetty.util.URIUtil.canonicalPath(path); if (path==null) throw new MalformedURLException(); if ("/".equals(path)) return this; return new FileResource(_file, path); }
public FileResource(File file) { assertValidPath(file.toString()); _file=file; try { _uri = normalizeURI(_file, _file.toURI()); } catch (URISyntaxException e) { throw new InvalidPathException(_file.toString(), e.getMessage()) { { initCause(e); } }; } _alias=checkFileAlias(_uri,_file); }
public FileResource(URI uri) { File file=new File(uri); _file=file; try { URI file_uri = _file.toURI(); _uri = normalizeURI(_file, uri); assertValidPath(file.toString()); // Is it a URI alias? if (!URIUtil.equalsIgnoreEncodings(_uri.toASCIIString(), file_uri.toString())) _alias = _file.toURI(); else _alias = checkFileAlias(_uri, _file); } catch (URISyntaxException e) { throw new InvalidPathException(_file.toString(), e.getMessage()) { { initCause(e); } }; } }
assertValidPath(file.toString());
@Override public Resource addPath(String path) throws IOException, MalformedURLException { assertValidPath(path); path = org.eclipse.jetty.util.URIUtil.canonicalPath(path); if (path==null) throw new MalformedURLException(); if ("/".equals(path)) return this; return new FileResource(_file, path); }
FileResource(File file) { assertValidPath(file.toString()); _file=file; _uri=normalizeURI(_file,_file.toURI()); _alias=checkFileAlias(_file); }
public FileResource(URI uri) { File file=new File(uri); _file=file; URI file_uri=_file.toURI(); _uri=normalizeURI(_file,uri); assertValidPath(file.toString()); // Is it a URI alias? if (!URIUtil.equalsIgnoreEncodings(_uri,file_uri.toString())) _alias=_file.toURI(); else _alias=checkFileAlias(_file); }
public FileResource(File file) { assertValidPath(file.toString()); _file=file; try { _uri = normalizeURI(_file, _file.toURI()); } catch (URISyntaxException e) { throw new InvalidPathException(_file.toString(), e.getMessage()) { { initCause(e); } }; } _alias=checkFileAlias(_uri,_file); }
public FileResource(URI uri) { File file=new File(uri); _file=file; try { URI file_uri = _file.toURI(); _uri = normalizeURI(_file, uri); assertValidPath(file.toString()); // Is it a URI alias? if (!URIUtil.equalsIgnoreEncodings(_uri.toASCIIString(), file_uri.toString())) _alias = _file.toURI(); else _alias = checkFileAlias(_uri, _file); } catch (URISyntaxException e) { throw new InvalidPathException(_file.toString(), e.getMessage()) { { initCause(e); } }; } }
assertValidPath(file.toString());
assertValidPath(file.toString());
throws IOException,MalformedURLException assertValidPath(path); path = org.eclipse.jetty.util.URIUtil.canonicalPath(path);