从FileOutputStream获取文件名 [英] Get file name from FileOutputStream

查看:1285
本文介绍了从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

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.

编辑: FileInputStream 也是如此。

这篇关于从FileOutputStream获取文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆