What if the space in the path becomes% 20 and causes the new File(path) to report an error?
This article introduces the knowledge of "what to do when the space in the path becomes% 20 causes new File (path) to report an error". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The space in the path becomes% 20, causing new File (path) to report an error FileNotFoundException cannot find the specified file.
Use URLEncode.decode (path, "utf-8") to solve the problem.
This is the end of the content of "what to do if the space in the path becomes% 20 causes new File (path) to report an error". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!