Package org.infinispan.util
Class ByteString
- java.lang.Object
-
- org.infinispan.util.ByteString
-
public class ByteString extends Object
A simple class which encapsulates a byte[] representation of a String using a predefined encoding (currently UTF-8). This avoids repeated invocation of the expensiveDataOutput.writeUTF(String)on marshalling- Since:
- 9.0
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ByteStringemptyString()booleanequals(Object o)static ByteStringfromString(String s)inthashCode()static ByteStringreadObject(ObjectInput input)StringtoString()static voidwriteObject(ObjectOutput output, ByteString object)
-
-
-
Method Detail
-
fromString
public static ByteString fromString(String s)
-
emptyString
public static ByteString emptyString()
-
writeObject
public static void writeObject(ObjectOutput output, ByteString object) throws IOException
- Throws:
IOException
-
readObject
public static ByteString readObject(ObjectInput input) throws IOException
- Throws:
IOException
-
-