从 FileOutputStream 获取文件名 [英] Get file name from FileOutputStream
本文介绍了从 FileOutputStream 获取文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法从 FileOutputStream
或从 FileInputStream
获取文件名?
Is there a way to get the file name from a FileOutputStream
or from FileInputStream
?
推荐答案
看起来答案是否定的: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
没有返回用于构建流的 File
或 String
的公共方法.
There are no public methods that return the File
or String
used in construction of the stream.
同样适用于 FileInputStream
.
这篇关于从 FileOutputStream 获取文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文