首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

读写资料内容

2012-09-01 
读写文件内容public class ReadOfficeDoc {/* * 不能直接获取doc文档中的数据,获取的全部是乱码 */public

读写文件内容

public class ReadOfficeDoc {/* * 不能直接获取doc文档中的数据,获取的全部是乱码 */public static void main(String[] args) {FileInputStream fis;try {fis = new FileInputStream("c:\\HUAWEI统一WebUI接口说明书.doc");BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fis));String str;while((str = bufferedReader.readLine()) != null){System.out.println(str);}} catch (FileNotFoundException e) {e.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}}

?

热点排行