I need some Java way alike bash touch
-command on FTP – create an empty file on FTP server with org.apache.commons.net.ftp.FTPClient
(or another library).
Upload an empty "in-memory file", like this:
InputStream bin = ByteArrayInputStream(new byte[0]);
ftpClient.storeFile("/remote/path/emptyfile", bin);