这段代码为什么inputstream的对象is是空指针???因为文件内没有内容 ? try {
FileOutputStream fos = new FileOutputStream("C:\\Documents and Settings\\Administrator\\1" );
InputStream is = test.class.getClassLoader().getResourceAsStream("1");
//t.copyAll(is, fos);
fos.close();
is.close();
} catch (Exception f) {
//try to load anyways - could be a sharing violation
}
FileOutputStream fos = new FileOutputStream("C:\\Documents and Settings\\Administrator\\1" );
InputStream is = test.class.getClassLoader().getResourceAsStream("1");
//t.copyAll(is, fos);
fos.close();
is.close();
} catch (Exception f) {
//try to load anyways - could be a sharing violation
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货