code: private byte transitionToNextToken(boolean lastChunk) {
          int endNextToken = findNextChar(responseContent, ':');
          if (endNextToken < 0 && !lastChunk) {
              return queryParsingState;
          }
  
          if (endNextToken < 0 && lastChunk && queryParsingState >= QUERY_STATE_STATUS) {
              return QUERY_STATE_NO_INFO;
          }
  
          byte newState;
          ByteBuf peekSlice = responseContent.readSlice(endNextToken + 1);
          String peek = peekSlice.toString(CHARSET);
          if (peek.contains("\"signature\":")) {
              newState = QUERY_STATE_SIGNATURE;
          } else if (peek.endsWith("\"results\":")) {
              newState = QUERY_STATE_ROWS_DECIDE;
          } else if (peek.endsWith("\"status\":")) {
              newState = QUERY_STATE_STATUS;
          } else if (peek.endsWith("\"errors\":")) {
              newState = QUERY_STATE_ERROR;
          } else if (peek.endsWith("\"warnings\":")) {
              newState = QUERY_STATE_WARNING;
          } else if (peek.endsWith("\"metrics\":")) {
              newState = QUERY_STATE_INFO;
          } else {
              if (lastChunk) {
                  IllegalStateException e = new IllegalStateException("Error parsing query response (in TRANSITION) at \""
                          + peek + "\", enable trace to see response content");
                  if (LOGGER.isTraceEnabled()) {
                      LOGGER.trace(responseContent.toString(CHARSET), e);
                  }
                  throw e;
              } else {
                  //we need more data
                  return queryParsingState;
              }
          }
  
          sectionDone = false;
          return newState;
      }
docs: Peek the next token, returning the QUERY_STATE corresponding to it and placing the readerIndex just after
  the token's ':'. Must be at the end of the previous token.
  
  @param lastChunk true if this is the last chunk
  @return the next QUERY_STATE