Lines Matching refs:value

57  * <li>Subclass UrlQuerySanitizer.ValueSanitizer to define your own value
65 * A simple tuple that holds parameter-value pairs.
70 * Construct a parameter-value tuple.
72 * @param value an unencoded value
75 String value) {
77 mValue = value;
84 * The unencoded value
101 * A functor used to sanitize a single query value.
106 * Sanitize an unencoded value.
107 * @param value
108 * @return the sanitized unencoded value
110 public String sanitize(String value);
288 * Sanitize a value.
299 * @param value
300 * @return the sanitized value
302 public String sanitize(String value) {
303 if (value == null) {
306 int length = value.length();
309 String asLower = value.toLowerCase(Locale.ROOT);
318 // and end of value.
320 value = trimWhitespace(value);
323 length = value.length();
328 char c = value.charAt(i);
347 * @param value the string to trim
350 private String trimWhitespace(String value) {
352 int last = value.length() - 1;
354 while (start <= end && isWhitespace(value.charAt(start))) {
357 while (end >= start && isWhitespace(value.charAt(end))) {
361 return value;
363 return value.substring(start, end + 1);
410 * Get the current value sanitizer used when processing
413 * <b>Note:</b> The default unregistered parameter value sanitizer is
425 * Set the value sanitizer used when processing unregistered
475 * Return a value sanitizer that does not allow any special characters,
477 * @return a value sanitizer
484 * Return a value sanitizer that allows everything except Nul ('\0')
486 * @return a value sanitizer
492 * Return a value sanitizer that allows everything except Nul ('\0')
495 * @return a value sanitizer
501 * Return a value sanitizer that allows all the characters used by
503 * @return a value sanitizer
509 * Return a value sanitizer that allows all the characters used by
513 * @return a value sanitizer
519 * Return a value sanitizer that does not allow any special characters
521 * @return a value sanitizer
527 * Return a value sanitizer that does not allow any special characters
529 * @return a value sanitizer
535 * Return a value sanitizer that does not allow any special characters
537 * @return a value sanitizer
543 * Return a value sanitizer that allows any special characters
546 * @return a value sanitizer
559 * <li>The default value sanitizer is an AllIllegal value sanitizer.
582 * <li>The default value sanitizer is an AllIllegal value sanitizer.
610 * Parse a query. A query string is any number of parameter-value clauses
611 * separated by any non-zero number of ampersands. A parameter-value clause
612 * is a parameter followed by an equal sign, followed by a value. If the
613 * equal sign is missing, the value is assumed to be the empty string.
625 // No assignment found, treat as if empty value
647 * An array list of all of the parameter value pairs in the sanitized
666 * Get the value for a parameter in the current sanitized query.
670 * @return the sanitized unencoded value of the parameter,
678 * Register a value sanitizer for a particular parameter. Can also be used
679 * to replace or remove an already-set value sanitizer.
681 * Registering a non-null value sanitizer for a particular parameter
684 * @param valueSanitizer the value sanitizer to use for a particular
697 * Register a value sanitizer for an array of parameters.
763 * Parse an escaped parameter-value pair. The default implementation
764 * unescapes both the parameter and the value, then looks up the
765 * effective value sanitizer for the parameter and uses it to sanitize
766 * the value. If all goes well then addSanitizedValue is called with
767 * the unescaped parameter and the sanitized unescaped value.
769 * @param value an unsanitzied escaped value
771 protected void parseEntry(String parameter, String value) {
779 String unescapedValue = unescape(value);
785 * Record a sanitized parameter-value pair. Override if you want to
788 * @param value a sanitized unescaped value
790 protected void addSanitizedEntry(String parameter, String value) {
792 new ParameterValuePair(parameter, value));
798 mEntries.put(parameter, value);
802 * Get the value sanitizer for a parameter. Returns null if there
803 * is no value sanitizer registered for the parameter.
805 * @return the currently registered value sanitizer for this parameter.
813 * Get the effective value sanitizer for a parameter. Like getValueSanitizer,
814 * except if there is no value sanitizer registered for a parameter, and
815 * unregistered paramaters are allowed, then the default value sanitizer is
818 * @return the effective value sanitizer for a parameter.
887 * @return the integer value of the hexidecimal digit.