When I pass it to ImageIO.read(URL), I get 'Can't get input stream for the URL; Server returned response code 400', which is strange, since ImageIO uses the very same java.net package.
Would you please assist me on how to work this around and have valid URLs when building a URL?
I think the problem is not connected to utf-8. Depending on the operating system you use plus signs are not valid inside a file name. The pluses are replaced by spaces but there is not file with spaces in the name so the input stream gets no data.
Is there a way to replace the plus signs with for instance underscores?
I think the problem is not connected to utf-8. Depending on the operating system you use plus signs are not valid inside a file name. The pluses are replaced by spaces but there is not file with spaces in the name so the input stream gets no data.
Is there a way to replace the plus signs with for instance underscores?
Best,
Ramon
Hi, Ramon,
Well I can't change URLs, since I've not created them Any random image URL could be passed to my app.
Here it is again - I regularly test my app with random images, but I can't even bring this image for reading. These spaces just freak me out. Here is the link: