📄 inputstream.jsp
字号:
<!--inputstream.jsp-->
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.io.*"%>
<html>
<head>
<title>InputStream</title>
</head>
<body>
<h1>
<%
try{
File myfile=new File("E:/temp1/inputstream.txt");
FileInputStream in=new FileInputStream(myfile);
BufferedInputStream bufferin=new BufferedInputStream(in);
byte b[]=new byte[20];
int n=0;
while((n=bufferin.read(b))!=-1){
String temp=new String (b,0,n);
out.print(temp);
}
bufferin.close();
in.close();
}
catch(IOException e){
out.println("error!");
}
%>
</h1>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -