public void Text2() throws IOException{
long start = System.currentTimeMillis();
FileInputStream file = new FileInputStream("D:\\Text\\遍历目录\\FileTest.java");
byte[] b = new byte[20*1024];
int bytes = file.read(b,0,b.length);
int a = 1;
for(int i=0; i<bytes; i++){
if(b[i] <= 0xf)
System.out.print(0);
System.out.print(Integer.toHexString(b[i])+" ");
if(a++ % 10 == 0)
System.out.println();
}
损失函数
相关分类