I'm trying to read a properties file using BufferedInputStream and getResourceAsStream(),but getting "java.io.IOException: Stream closed' exception.
My properties file is not set in the classpath, I even tried by incuding the file as a jar in the classpath but invain.
My code snippet is:
BufferedInputStream bufferedinputstream =new BufferedInputStream(getClass().getClassLoader().ge tResourceAsStream(s));
where 's' is the name of the properties file.
I'm running as a standalone program.
Can anyone help me out in resolving the issue.