I need to upload files to a server through SFTP. First I have to create a file with a new file name. Then I have to write the outputstream to that file to fill it with content.
The only method I have found for creating a new file is createFile(FileName name) in the SftpFileSystem class. But since that class has a protected constructor, there is no way to get an instance of that class. Or is it? Is there any way to get an instance of the SftpFileSystem class, so I can use its createFile method? Or is there some better way to create files that the way I have planned it?