code: void sendReadResult(Socket sock, int statusCode) {
      assert !sentStatusCode : "already sent status code to " + sock;
      try {
        OutputStream out = NetUtils.getOutputStream(sock, HdfsConstants.WRITE_TIMEOUT);
        byte buf[] = { (byte) ((statusCode >>> 8) & 0xff), 
                       (byte) ((statusCode) & 0xff) };
        out.write(buf);
        out.flush();
        sentStatusCode = true;
      } catch (IOException e) {
     // its ok not to be able to send this.
        LOG.debug("Could not write to datanode " + sock.getInetAddress() +
                  ": " + e.getMessage());
      }
      
    }
docs: When the reader reaches end of the read, it sends a status response
  (e.g. CHECKSUM_OK) to the DN. Failure to do so could lead to the DN
  closing our connection (which we will re-open), but won't affect
  data correctness.
  @param sock
  @param statusCode