java. net. Local file protocol for URL

What is the protocol for local files that use URLs? I have downloaded a file using Java, and I need to know how to access it instead of using file, but using URL

thank you!

Solution

UNIX

file://localhost/<path>
file:///<path>

window

file://localhost/<drive>|/<path>
file:///<drive>|/<path>
file://localhost/<drive>:/<path>
file:///<drive>:/<path>

For more information, see related Wikipedia article

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>