code: static boolean readElement(ByteBuf buffer, OutputStream byteBuffer) throws IOException {
        for (; ; ) {
           byte next = buffer.readByte();
           if (next == SP) { // Space
              return false;
           } else if (next == CR) { // CR
              next = buffer.readByte();
              if (next == LF) { // LF
                 return true;
              } else {
                 byteBuffer.write(next);
              }
           } else {
              byteBuffer.write(next);
           }
        }
     }
docs: In the particular case of Memcached, the end of operation/command
  is signaled by "\r\n" characters. So, if end of operation is
  found, this method would return true. On the contrary, if space was
  found instead of end of operation character, then it'd return the element and false.