Package org.infinispan.util
Class ByteString
java.lang.Object
org.infinispan.util.ByteString
- All Implemented Interfaces:
Comparable<ByteString>
A simple class which encapsulates a byte[] representation of a String using a predefined encoding (currently UTF-8).
This avoids repeated invocation of the expensive
DataOutput.writeUTF(String) on marshalling- Since:
- 9.0
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptionintstatic ByteStringbooleanstatic ByteStringfromString(String s) inthashCode()static booleanstatic ByteStringreadObject(ObjectInput input) toString()static voidwriteObject(ObjectOutput output, ByteString object)
-
Method Details
-
fromString
-
isValid
-
emptyString
-
hashCode
public int hashCode() -
equals
-
toString
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
-
compareTo
- Specified by:
compareToin interfaceComparable<ByteString>
-