In Java can I create a URI for a file located locally in the hard drive? If so, how should it be constructed?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Try below:
Look at File documentation:
File has a constructor, which takes URI as a parameter, and it also has method
toURI()
if you want to get URI from existing file. You can play with that to understand how the things should be done.You can also read about URI (it's not a java term). There is an example in Wikipedia:
If you're using Windows: