Is there a way to get the file name from a FileOutputStream or from FileInputStream?
Is there a way to get the file name from a FileOutputStream or from
Share
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.
Looks like the answer is no:
http://download.oracle.com/javase/1.4.2/docs/api/java/io/FileOutputStream.htmlhttp://docs.oracle.com/javase/7/docs/api/index.html?java/io/FileOutputStream.html
There are no public methods that return the
FileorStringused in construction of the stream.EDIT: The same holds for
FileInputStream.