50,549
社区成员
发帖
与我相关
我的任务
分享
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
public class TestName {
public static void main(String args[]) throws Exception{
String path = "D:/培训记录副本 .txt" ;
File f = new File(path) ;
InputStream is = new FileInputStream(f) ;
is.close() ;
}
}
public static void main(String []args) throws IOException{
File f1 = new File("d:\\专业 pro\\哈哈 world.txt");
FileInputStream fis;
fis = new FileInputStream(f1);
byte[] bytIn = new byte[(int) f1.length()];
for (int i = 0; i < f1.length(); i++) {
bytIn[i] = (byte) fis.read();
System.out.println(bytIn[i]);
}
}