public void sendResult(final OSDRequest rq, InternalObjectData response, ErrorResponse error) {

    if (error != null) {
      rq.sendError(error);
    } else {
      // only locally
      rq.sendSuccess(response.getMetadata(), response.getData());
    }
  }
  private void readFinish(
      OSDRequest rq,
      xtreemfs_check_objectRequest args,
      ObjectInformation result,
      boolean isLastObjectOrEOF) {

    InternalObjectData data;
    data = result.getObjectData(isLastObjectOrEOF, 0, result.getStripeSize());
    if (data.getData() != null) {
      data.setZero_padding(data.getZero_padding() + data.getData().remaining());
      BufferPool.free(data.getData());
      data.setData(null);
    }
    sendResponse(rq, data);
  }
 public void sendResponse(OSDRequest rq, InternalObjectData result) {
   rq.sendSuccess(result.getMetadata(), null);
 }