`
jackleechina
  • 浏览: 587150 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类

FileInputStream

    博客分类:
  • java
 
阅读更多
FileInputStream in = null;
		String result1 = "";
		try {
			in = new FileInputStream(Params.BASE_PATH + Params.PDF_TEMPLATE_PATH);
			byte[] b = new byte[1024];
			int length = 0;
			while ((length = in.read(b)) != -1) {
				result1 = result1 + new String(b, 0, length);
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			try {
				in.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics