firstBytePos is a long, but the lastBytePos is an int, which truncates the offset of a range you can specify.