public ByteBuffer getResponse(int size) {
    if (response == null || response.capacity() < size) {
      response = ByteBuffer.allocate(size);
    }
    clear(response);
    response.put(RESPONSE_MAGIC);
    response.rewind();
    response.limit(size);
    return response;
  }
Returns an initialized byteBuffer for sending the reply

@param size size of ByteBuffer
@return the initialized response buffer
geode-memcached/src/main/java/org/apache/geode/internal/memcached/RequestReader.java