question: private Sha256Hash calculateHash ( ) { try { ByteArrayOutputStream bos = new UnsafeByteArrayOutputStream ( HEADER_SIZE ) ; writeHeader ( bos ) ; return new Sha256Hash ( Utils . reverseBytes ( doubleDigest ( bos . toByteArray ( ) ) ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
target:  Calculates the block hash by serializing the block and hashing the resulting bytes.