Java read(byte[] b)相关问题:read 每次读取3个字节,它是如何避免每次从头开始读取的?(hello c++)
importjava.io.File;importjava.io.FileInputStream;importjava.io.FileNotFoundException;...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; public class Test5 { public static void main(String[] args) throws Exception { File file = new File("d:/java/xgj.txt"); FileInputStream fis = new FileInputStream (file); byte[] b = new byte[3]; int len; int num = 0; // len = fis.read(b); while((len= fis.read(b)) !=-1) { for(i
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询