I need to create a File object from URL object
My requirement is
I need to create a file object of a web image (say googles logo)
URL url = new URL("http://google.com/pathtoaimage.jpg");
File f = create image from url object
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can make use of
ImageIOin order to load the image from an URL and then write it to a file. Something like this:This also allows you to convert the image to some other format if needed.