Package tv.hd3g.transfertfiles
Class AbstractFileSystemURL
- java.lang.Object
-
- tv.hd3g.transfertfiles.AbstractFileSystemURL
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class AbstractFileSystemURL extends Object implements Closeable
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractFileSystemURL(String ressourceURL)protectedAbstractFileSystemURL(String protectedRessourceURL, AbstractFileSystem<?> fileSystem, String basePath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetBasePath()AbstractFileSystem<?>getFileSystem()AbstractFilegetFromPath(String path)AbstractFilegetRootPath()booleanisReusable()If disconnected, can we re-connect after ?static Stream<String>protectedSplit(String text)StringtoString()Passwords will be replaced by "*"
-
-
-
Constructor Detail
-
AbstractFileSystemURL
protected AbstractFileSystemURL(String protectedRessourceURL, AbstractFileSystem<?> fileSystem, String basePath)
-
AbstractFileSystemURL
public AbstractFileSystemURL(String ressourceURL)
- Parameters:
ressourceURL- like "protocol://user:password@host/basePath?password=secret&active&key=/path/to/privateOpenSSHkey" query must not be encoded use ":password" or "password=" as you want. Never set an "@" in the user:password place. Quotation mark here are ignored (simply used as quotation marks). Never add directly an "&" in the password in query, but you can use " (quotation mark) like password="s&e?c=r+t" key password can be set by... set password FTP(S|ES) is passive by default. - Add "ignoreInvalidCertificates" to bypass TLS verification with FTPS/FTPES clients.
-
-
Method Detail
-
toString
public String toString()
Passwords will be replaced by "*"
-
getFileSystem
public AbstractFileSystem<?> getFileSystem()
-
getFromPath
public AbstractFile getFromPath(String path)
- Returns:
- after fileSystem.connect
-
getRootPath
public AbstractFile getRootPath()
- Returns:
- after fileSystem.connect
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
isReusable
public boolean isReusable()
If disconnected, can we re-connect after ?
-
getBasePath
public String getBasePath()
-
-