Package org.apache.lucene.util
Class ToStringUtils
java.lang.Object
org.apache.lucene.util.ToStringUtils
Helper methods to ease implementing
Object.toString().-
Method Summary
Modifier and TypeMethodDescriptionstatic voidbyteArray(StringBuilder buffer, byte[] bytes) static StringbytesRefToString(byte[] b) static StringBuilds a String with both textual representation of theBytesRefdata and the bytes hex values.static Stringstatic StringlongHex(long x) UnlikeLong.toHexString(long)returns a String with a "0x" prefix and all the leading zeros.
-
Method Details
-
byteArray
-
longHex
UnlikeLong.toHexString(long)returns a String with a "0x" prefix and all the leading zeros. -
bytesRefToString
Builds a String with both textual representation of theBytesRefdata and the bytes hex values. For example:"hello [68 65 6c 6c 6f]". If the content is not a valid UTF-8 sequence, only the bytes hex values are returned, as perBytesRef.toString(). -
bytesRefToString
-
bytesRefToString
-