public static void main(String[] args) throws FileNotFoundException, IOException {
InputStream is=new FileInputStream("resource.properties");
byte[] b=new byte[is.available()];s
while(is.read(b)!=-1){
//System.out.print(new String(b,"utf-8"));
}
String str=new String(b,"utf-8");
String[] strs=str.split(" ");
for(int i=0;i<strs.length;i++){
System.out.println(strs[i]);
}
}
java读取资源文件--使用文件流的方式读取
最新推荐文章于 2023-05-06 17:13:50 发布