You cannot get the file name from the reader.
But you have the file name before. This way you can save it for further process. Something like that
String file_name= "spc.f"; FileReader f1 = new FileReader(file_name); buffread1 = new BufferedReader (f1 ); String name = file_name;
source share