seek()
-1
len
0
off
4041424344454647484950
saf.read(safs); this.printBytes("safs:", safs); saf.seek(0); byte[] bs = "pqrstuvwxyz".getBytes(); long index = saf.indexOf(bs, 0, bs.length); System.out.println("saf.indexOf(bs) 1:"+index); if(index!=-1){ super.fail(); } saf.seek(0);
4748495051525354555657
if(index!=-1){ super.fail(); } saf.seek(0); bs = "0123456789".getBytes(); index = saf.indexOf(bs, 0, bs.length); System.out.println("saf.indexOf(bs) 2:"+index); if(index!=3){ super.fail(); } saf.seek(0);
5455565758596061626364
if(index!=3){ super.fail(); } saf.seek(0); bs = "试索引".getBytes("gb2312"); index = saf.indexOf(bs, 0, bs.length); this.printBytes("试索引:", bs); System.out.println("saf.indexOf(bs) 3:"+index); if(index!=17){ super.fail();