for (String name : filenames) { FileInputStream in = new FileInputStream(input.readUTF()); int byteCounter = 0; int rowCounter = 0; long buff
the problem is here
System.out.print(Integer.toHexString(read) + "\t");
read contains the number of bytes effectively read from stream. Teh bytes are in array b.
read
b
By the way: your array has a size of 8. you should increas it to 10 if you want to read 10 bytes!