FileWriter fw;
		String str[] = {"你", "好"};
		for(int i = 0; i<str.length; i++){
			fw.write(str[i]+"\n");
		}
		fw.close();
		
		FileInputStream in = new FileInputStream("c://in.txt");
		FileOutputStream out = new FileOutputStream("c://out.txt");
		int c;
		while((c=in.read())!=-1){
			out.write(c);
		}
		
		Reader in = new InputStreamReader(new FileInputStream(infile), "GBK");
		while((in.read())!=-1){
			(char)in.read();
		}
		in.close();

		BufferReader input = new BufferReader(new InputStreamReader(new FileInputStream(infile), "GBK"));
		String str = "";
		String temStr = "";
		while((tmpStr = input.readLine())!=null){
			str +=temStr;
		}
		System.out.println("str = "+str);
		input.close();

Logo

openvela 操作系统专为 AIoT 领域量身定制,以轻量化、标准兼容、安全性和高度可扩展性为核心特点。openvela 以其卓越的技术优势,已成为众多物联网设备和 AI 硬件的技术首选,涵盖了智能手表、运动手环、智能音箱、耳机、智能家居设备以及机器人等多个领域。

更多推荐