Posted on 2006-11-12 23:11
苑 阅读(459)
评论(0) 编辑 收藏 所属分类:
java基础学习系列
import
java.io.BufferedInputStream;
import
java.io.FileInputStream;
public class
MainClass
{
public static
void
main
(
String args
[]) {
try
{
FileInputStream fis =
new
FileInputStream
("fileName"
)
;
BufferedInputStream bis =
new
BufferedInputStream
(
fis
)
;
int
i;
while
((
i = bis.read
())
!= -
1
) {
System.out.println
(
i
)
;
}
fis.close
()
;
}
catch
(
Exception e
) {
System.out.println
(
"Exception: "
+ e
)
;
}
}
}