code: void writeHeader(OutputStream stream) throws IOException {
          // try for cached write first
          if (headerBytesValid && payload != null && payload.length >= offset + HEADER_SIZE) {
              stream.write(payload, offset, HEADER_SIZE);
              return;
          }
          // fall back to manual write
          Utils.uint32ToByteStreamLE(version, stream);
          stream.write(prevBlockHash.getReversedBytes());
          stream.write(getMerkleRoot().getReversedBytes());
          Utils.uint32ToByteStreamLE(time, stream);
          Utils.uint32ToByteStreamLE(difficultyTarget, stream);
          Utils.uint32ToByteStreamLE(nonce, stream);
      }
docs: default for testing