I'm trying to use apache VFS to establish a connection with a SFTP server. The issue here is in the SFTP URL i am using.
The symbol "@" in the URL is the separator between the password and the host IP. Anything after the "@" symbol it treat as the IP of the server. But if my password itself contains the "@" symbol then there are two "@" symbols in my URL and it treat the first "@" symbol which is in the password as the separator and does not work.
Pls see the example below.
Is there any workaround???
FileSystemOptions fso = new FileSystemOptions();
DefaultFileSystemManager fsm = new DefaultFileSystemManager();
SftpFileObject fo = fsm.resolveFile("sftp://test:test@123@localhost/", fso).getContent().getFile();