public class TableUtil extends Object
Modifier and Type | Field and Description |
---|---|
static ByteBuffer |
YES_VAL |
Constructor and Description |
---|
TableUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getReversedHost(String reversedUrl)
Given a reversed url, returns the reversed host E.g
"com.foo.bar:http:8983/to/index.html?a=b" -> "com.foo.bar"
|
static String |
reverseHost(String hostName) |
static String |
reverseUrl(String urlString)
Reverses a url's domain.
|
static String |
reverseUrl(URL url)
Reverses a url's domain.
|
static String |
toString(CharSequence utf8)
Convert given Utf8 instance to String and and cleans out any offending "�"
from the String.
|
static String |
unreverseHost(String reversedHostName) |
static String |
unreverseUrl(String reversedUrl) |
public static final ByteBuffer YES_VAL
public static String reverseUrl(String urlString) throws MalformedURLException
E.g. "http://bar.foo.com:8983/to/index.html?a=b" becomes "com.foo.bar:8983:http/to/index.html?a=b".
url
- url to be reversedMalformedURLException
public static String reverseUrl(URL url)
E.g. "http://bar.foo.com:8983/to/index.html?a=b" becomes "com.foo.bar:http:8983/to/index.html?a=b".
url
- url to be reversedpublic static String getReversedHost(String reversedUrl)
reversedUrl
- Reversed urlpublic static String toString(CharSequence utf8)
utf8
- Utf8 objectCopyright © 2015 The Apache Software Foundation