摘要:
出现乱码请修改为BufferedReader br = new BufferedReader(new InputStreamReader( new FileInputStream(path), "GBK"));一.获得控制台用户输入的信息 public String getInputMessage() throws IOException...{ System.out.println("请输入您的命令∶"); byte buffer[]=new byte[1024]; int count=System.in.read(buffer)... 阅读全文
摘要:
public HttpServletResponse download(String path, HttpServletResponse response) { try { // path是指欲下载的文件的路径。 File file = new File(path); // 取得文件名。 String filename = file.getName(); // 取得文件的后缀名。 String ext = filename.substring(fil... 阅读全文