Convert inputstream to a file ?
807603Jan 28 2008 — edited Jan 31 2008Hi,
I have to read a file present in the classpath and then get a File object
To read the file relatively I did the following:-
InputStream is = ClassName.class.getClassLoader().getResourceAsStream(pathOfTheClassInClasspath)
But now i need to convert it to a File object (to keep the method same as it was earlier), something like;
File f = ......
Is there any way to achieve what I am trying to ?