解决方法
这是不可能的. (不是Java API中的FileInputStream). FileInputStream构造函数不会将此信息存储在任何字段中:
public FileInputStream(File file) throws FileNotFoundException { String name = (file != null ? file.getPath() : null); SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkRead(name); } if (name == null) { throw new NullPointerException(); } fd = new FileDescriptor(); open(name); }