private String readString(InputStream is) throws Exception {
        char delim = (char) read(1)[0];
        StringBuilder sb = new StringBuilder();
        boolean valid = false;
        while (is.available() > 0) {
            char c = (char) is.read();
            if (c == delim) {
                valid = true;
                break;
            } else if (c == '\\') {
                // read the next character as part of the value
                c = (char) is.read();
                sb.append(c);
            } else {
                sb.append(c);
            }
        }
        if (!valid) {
            throw new ParserException(
                    "String constant is not quoted with <" + delim + "> : " + sb.toString());
        }
        return QUOTE + sb.toString() + QUOTE;
    }
Reads an escaped string

@throws Exception
es6-persistence/src/main/java/com/netflix/conductor/es6/dao/query/parser/internal/ConstValue.java