while (offset < targetOffset && (read = segFIS.read()) != -1) {
offset++;
}
assertEquals("Couldn't read up to target offset", targetOffset, offset);
assertEquals("Unexpected amount of data available",
testFileLength - targetOffset, segFIS.available());
segFIS.mark(0);
while ((read = segFIS.read()) != -1) {
assertEquals("Read unexpected byte at offset " + offset,
(offset % 256), read);
offset++;