Class StringBuilderUtils
- java.lang.Object
-
- org.glassfish.jersey.message.internal.StringBuilderUtils
-
public class StringBuilderUtils extends Object
Internalstring builder
utilities for building HTTP header values.- Author:
- Marc Hadley, Marek Potociar, Martin Matula
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
appendQuotedIfNonToken
public static void appendQuotedIfNonToken(StringBuilder b, String value)
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
public static void appendQuotedIfWhitespace(StringBuilder b, String value)
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
public static void appendQuoted(StringBuilder b, String value)
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
public static void appendEscapingQuotes(StringBuilder b, String value)
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.
-
-