org.apache.hadoop.hbase.util
Class Strings
java.lang.Object
org.apache.hadoop.hbase.util.Strings
public class Strings
- extends Object
Utility for Strings.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_SEPARATOR
public static final String DEFAULT_SEPARATOR
- See Also:
- Constant Field Values
DEFAULT_KEYVALUE_SEPARATOR
public static final String DEFAULT_KEYVALUE_SEPARATOR
- See Also:
- Constant Field Values
Strings
public Strings()
appendKeyValue
public static StringBuilder appendKeyValue(StringBuilder sb,
String key,
Object value)
- Append to a StringBuilder a key/value.
Uses default separators.
- Parameters:
sb
- StringBuilder to usekey
- Key to append.value
- Value to append.
- Returns:
- Passed
sb
populated with key/value.
appendKeyValue
public static StringBuilder appendKeyValue(StringBuilder sb,
String key,
Object value,
String separator,
String keyValueSeparator)
- Append to a StringBuilder a key/value.
Uses default separators.
- Parameters:
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.
- Returns:
- Passed
sb
populated with key/value.
domainNamePointerToHostName
public static String domainNamePointerToHostName(String dnPtr)
- Given a PTR string generated via reverse DNS lookup, return everything
except the trailing period. Example for host.example.com., return
host.example.com
- Parameters:
dnPtr
- a domain name pointer (PTR) string.
- Returns:
- Sanitized hostname with last period stripped off.
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.