I'm using Jsch
to transfer an html file from a remote server to my local system, which I plan on showing in an SWT
browser. com.jcraft.jsch.ChannelSftp
provides a getter method that returns an InputStream
. I'm wondering if theres a way to translate that InputStream
into a URL
without writing the file contents out to disk.
You can create a custom Protocol Handler , and then (in theory) anything that takes a URL object should be able to use the custom protocol to retrieve data. The protocol handler would then just encapsulate the JCraft code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.