@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
protected FilterFs(AbstractFileSystem fs) throws URISyntaxException { super(fs.getUri(), fs.getUri().getScheme(), false, fs.getUriDefaultPort()); myFs = fs; }
/** * Get a canonical name for this file system. * @return a URI string that uniquely identifies this file system */ public String getCanonicalServiceName() { return SecurityUtil.buildDTServiceName(getUri(), getUriDefaultPort()); }
public ChRootedFs(final AbstractFileSystem fs, final Path theRoot) throws URISyntaxException { super(fs.getUri(), fs.getUri().getScheme(), false, fs.getUriDefaultPort()); myFs = fs; myFs.checkPath(theRoot); chRootPathPart = new Path(myFs.getUriPath(theRoot)); chRootPathPartString = chRootPathPart.toUri().getPath(); /* * We are making URI include the chrootedPath: e.g. file:///chrootedPath. * This is questionable since Path#makeQualified(uri, path) ignores * the pathPart of a uri. Since this class is internal we can ignore * this issue but if we were to make it external then this needs * to be resolved. */ // Handle the two cases: // scheme:/// and scheme://authority/ myUri = new URI(myFs.getUri().toString() + (myFs.getUri().getAuthority() == null ? "" : Path.SEPARATOR) + chRootPathPart.toUri().getPath().substring(1)); super.checkPath(theRoot); }
int thatPort = uri.getPort(); if (thatPort == -1) { // -1 => defaultPort of Uri scheme thatPort = this.getUriDefaultPort();
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
@Override public int getUriDefaultPort() { return myFs.getUriDefaultPort(); }
protected FilterFs(AbstractFileSystem fs) throws URISyntaxException { super(fs.getUri(), fs.getUri().getScheme(), false, fs.getUriDefaultPort()); myFs = fs; }
protected FilterFs(AbstractFileSystem fs) throws URISyntaxException { super(fs.getUri(), fs.getUri().getScheme(), false, fs.getUriDefaultPort()); myFs = fs; }
/** * Get a canonical name for this file system. * @return a URI string that uniquely identifies this file system */ public String getCanonicalServiceName() { return SecurityUtil.buildDTServiceName(getUri(), getUriDefaultPort()); }
/** * Get a canonical name for this file system. * @return a URI string that uniquely identifies this file system */ public String getCanonicalServiceName() { return SecurityUtil.buildDTServiceName(getUri(), getUriDefaultPort()); }
/** * Get a canonical name for this file system. * @return a URI string that uniquely identifies this file system */ public String getCanonicalServiceName() { return SecurityUtil.buildDTServiceName(getUri(), getUriDefaultPort()); }
protected FilterFs(AbstractFileSystem fs) throws URISyntaxException { super(fs.getUri(), fs.getUri().getScheme(), fs.getUri().getAuthority() != null, fs.getUriDefaultPort()); myFs = fs; }
/** * Get a canonical name for this file system. * @return a URI string that uniquely identifies this file system */ public String getCanonicalServiceName() { return SecurityUtil.buildDTServiceName(getUri(), getUriDefaultPort()); }
static AbstractFileSystem getMockFs(URI uri) { AbstractFileSystem mockFs = fsCache.get(uri.getAuthority()); if (mockFs == null) { mockFs = mock(AbstractFileSystem.class); when(mockFs.getUri()).thenReturn(uri); when(mockFs.getUriDefaultPort()).thenReturn(1); when(mockFs.getUriPath(any(Path.class))).thenCallRealMethod(); when(mockFs.isValidName(anyString())).thenReturn(true); fsCache.put(uri.getAuthority(), mockFs); } return mockFs; } }