W
www
Hi,
My Java program needs to do a lot of reading from text files or writing
to text files. I always provide the absolute path to those files. Things
are working.
But, I have heard that Class.getResourceAsStream() can do things more
intelligent: after specifying the path, the Java will search for the
file along the path to find the file with name matches what I want. This
will be useful, since my files have unique file names.
Is my understanding correct? I don't see many people using it and few
examples out there to help me start it. Could you give me some help?
Thank you.
My Java program needs to do a lot of reading from text files or writing
to text files. I always provide the absolute path to those files. Things
are working.
But, I have heard that Class.getResourceAsStream() can do things more
intelligent: after specifying the path, the Java will search for the
file along the path to find the file with name matches what I want. This
will be useful, since my files have unique file names.
Is my understanding correct? I don't see many people using it and few
examples out there to help me start it. Could you give me some help?
Thank you.