Is there a way to get the file name from a FileOutputStream or from FileInputStream?
FileOutputStream
FileInputStream
Looks like the answer is no: http://download.oracle.com/javase/1.4.2/docs/api/java/io/FileOutputStream.html http://docs.oracle.com/javase/7/docs/api/index.html?java/io/FileOutputStream.html
There are no public methods that return the File or String used in construction of the stream.
File
String
EDIT: The same holds for FileInputStream.
1.4m articles
1.4m replys
5 comments
57.0k users