标签:imp system exce except rac NPU lte java red
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class File {
public static void main(String[] args) {
String file = new String ("data.txt");
try {
FileOutputStream out = new FileOutputStream(file);
byte str[] = "12345abcdef@#%&*软件工程".getBytes();
out.write(str);
out.close();
}catch(Exception e) {
e.printStackTrace();
}
try {
FileInputStream in = new FileInputStream(file);
byte yhl[] = new byte[1024];
int mr = in.read(yhl);
System.out.println("文件是: "+new String(yhl,0,mr));
in.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
标签:imp system exce except rac NPU lte java red
原文地址:https://www.cnblogs.com/cxh15243652803/p/11057290.html