I am using libaums
and I read file from USB. All files as a UsbFile
type. I want send my file to FTP. When I send FTP need use FileInputStream
ant thos have parameter File
. How can I convert?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I think I answered this now a couple of times, at different places. There is simply no way to "convert" a UsbFile
into a java.io.File
. They are just completely different things. What you want to do is to use the UsbFileInputStream
. Your FTP library (whichever it is..) should be able to handle a generic InputStream
instead of only FileInputStreams
.