📄 downloadfile.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="java.io.*" %>
<%
try{
String fileName = "E:/Program Files/eclipse/workspace/baiban/bin/ChatDraw.html";
InputStreamReader in = new InputStreamReader(new FileInputStream(new File(fileName.substring(6))),"gb2312");
BufferedReader reader=new BufferedReader(in);
String line;
File aFile = new File("c:\\Test.html");
FileOutputStream out2 = new FileOutputStream(aFile);
byte[] b = new byte[1024];
while((line=reader.readLine())!=null)
{
b= line.getBytes();
out.print(line);
out2.write(b);
}
in.close();
}
catch(IOException e)
{
System.out.println(e.toString());
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -