Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_KEYVALUE_SEPARATOR |
static String |
DEFAULT_SEPARATOR |
Modifier | Constructor and Description |
---|---|
private |
Strings() |
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
appendKeyValue(StringBuilder sb,
String key,
Object value)
Append to a StringBuilder a key/value.
|
static StringBuilder |
appendKeyValue(StringBuilder sb,
String key,
Object value,
String separator,
String keyValueSeparator)
Append to a StringBuilder a key/value.
|
static String |
domainNamePointerToHostName(String dnPtr)
Given a PTR string generated via reverse DNS lookup, return everything except the trailing
period.
|
static String |
padFront(String input,
char padding,
int length)
Push the input string to the right by appending a character before it, usually a space.
|
public static final String DEFAULT_SEPARATOR
public static final String DEFAULT_KEYVALUE_SEPARATOR
private Strings()
public static StringBuilder appendKeyValue(StringBuilder sb, String key, Object value)
sb
- StringBuilder to usekey
- Key to append.value
- Value to append.sb
populated with key/value.public static StringBuilder appendKeyValue(StringBuilder sb, String key, Object value, String separator, String keyValueSeparator)
sb
- StringBuilder to usekey
- Key to append.value
- Value to append.separator
- Value to use between key and value.keyValueSeparator
- Value to use between key/value sets.sb
populated with key/value.public static String domainNamePointerToHostName(String dnPtr)
dnPtr
- a domain name pointer (PTR) string.public static String padFront(String input, char padding, int length)
input
- the string to padpadding
- the character to repeat to the left of the input stringlength
- the desired total length including the paddingCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.