How is it easier to upload files using FTP in java?

when uploading a file to the server using FTP, associate it by uploading inputStream as a parameter to the specified path, and inputStream also through the new File (path) to get a File object,

if my data is queried from the table and it is a list, instead of a file that already exists in my local file, how can I write this list in inputStream and upload it directly to the FTP server?

Note: means that I want to ask if the file must exist locally before I can upload the file to the FTP server through the inputStream output stream

Apr.09,2021

you can use ByteArrayOutputStream or ByteArrayInputStream as the intermediate stream conversion medium, and then upload FTP directly through the stream

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b82a-2c27e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b82a-2c27e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?