This line reads 'header.getBlockSize()' number of bytes into the 'block' byte array starting at index 'position'. Now given that the 'block' array was created at the size of 'header.getBlockSize()' you should be able to see that if the starting index is anything other than 0 the 'block' array isn't going to be big enough for all the values.
I was trying to create the block array to the block size. Then i was trying to read in the amount of a block size, into the block array, starting at that position.
If you try and read 10 bytes into a byte array of size 10 starting at position zero, then you will fill positions 0 to 9. No problem
If you try and read 10 bytes into a byte array of size 10 starting at position 5, then you will fill positions 5 to 14. Unfortunately you don't have positions 10 to 15, so you get an out of bounds exception.
Your array is header.getBlockSize() bytes long. You are trying to read 'header.getBlockSize() bytes into it. So, unless Header.headerSize + (id * Header.blockSize) evaluates to zero, you will get an out of bounds exception.