Class StringBuilderUtils
java.lang.Object
org.glassfish.jersey.message.internal.StringBuilderUtils
Internal
string builder
utilities for building HTTP header
values.- Author:
- Marc Hadley, Marek Potociar, Martin Matula
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendEscapingQuotes
(StringBuilder b, String value) Append a new value to the string builder.static void
appendQuoted
(StringBuilder b, String value) Append a new quoted value to the string builder.static void
appendQuotedIfNonToken
(StringBuilder b, String value) Append a new value to the string builder.static void
appendQuotedIfWhitespace
(StringBuilder b, String value) Append a new value to the string builder.
-
Method Details
-
appendQuotedIfNonToken
Append a new value to the string builder. If the value contains non-token characters (e.g. control, white-space, quotes, separators, etc.), the appended value is quoted and all the quotes in the value are escaped.- Parameters:
b
- string builder to be updated.value
- value to be appended.
-
appendQuotedIfWhitespace
Append a new value to the string builder. If the value contains white-space characters, the appended value is quoted and all the quotes in the value are escaped.- Parameters:
b
- string builder to be updated.value
- value to be appended.
-
appendQuoted
Append a new quoted value to the string builder. The appended value is quoted and all the quotes in the value are escaped.- Parameters:
b
- string builder to be updated.value
- value to be appended.
-
appendEscapingQuotes
Append a new value to the string builder. All the quotes in the value are escaped before appending.- Parameters:
b
- string builder to be updated.value
- value to be appended.
-