FileInputStream 和 FilterInputStream 都继承自InputStream,
它们是兄弟关系
在FilterInputStream中的构造子是这样定义的:
protected FilterInputStream(InputStream in),它声明为protected.
另外,FilterInputStream的描述是这样的:
A FilterInputStream contains some other input stream, which it uses as
its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterInputStream
itself simply overrides all methods of InputStream with versions that
pass all requests to the contained input stream. Subclasses of FilterInputStream
may further override some of these methods and may also provide additional methods and fields.
并不是你说的文件过虑类,文件过滤类应该继承javax.swing.filechooser.FileFilter
它们是兄弟关系
在FilterInputStream中的构造子是这样定义的:
protected FilterInputStream(InputStream in),它声明为protected.
另外,FilterInputStream的描述是这样的:
A FilterInputStream contains some other input stream, which it uses as
its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterInputStream
itself simply overrides all methods of InputStream with versions that
pass all requests to the contained input stream. Subclasses of FilterInputStream
may further override some of these methods and may also provide additional methods and fields.
并不是你说的文件过虑类,文件过滤类应该继承javax.swing.filechooser.FileFilter
解决方案 »
- Blowfish加密算法在JAVA中的问题
- 有人说if(true==a) 比if(a==true) 好处多 为什么
- 关于Swing模拟dos
- 请教java接收udp数据的问题
- socket怎样应用于界面?
- 如何实现用遥控器控制swing-based UI
- 两个DataInputStream型,如果加起来成一个DataInputStream?还有String型如果转成DataInputStream?
- 求JAVA程序
- 关于多线程,执行先后的问题。望给与提示。谢谢!
- java程序调试实用手册 哪里有电子版下载?!!!!!!!!!!!!!!!!
- 为什么我的查询没有结果呢?
- 如何设置JTABLE某一个单位格的TEXT的值
改成
FileInputStream fis = new FileInputStream(“c:/classes/class1.java”);