code: protected String consumeQuoted(ImapRequestLineReader request)
              throws ProtocolException {
          // The 1st character must be '"'
          consumeChar(request, '"');
  
          StringBuilder quoted = new StringBuilder();
          char next = request.nextChar();
          while (next != '"') {
              if (next == '\\') {
                  request.consume();
                  next = request.nextChar();
                  if (!isQuotedSpecial(next)) {
                      throw new ProtocolException("Invalid escaped character in quote: '" +
                              next + '\'');
                  }
              }
              quoted.append(next);
              request.consume();
              next = request.nextChar();
          }
  
          consumeChar(request, '"');
  
          return quoted.toString();
      }
docs: Reads a quoted string value from the request.