Package com.linkedin.venice.utils
Class ByteArray
- java.lang.Object
-
- com.linkedin.venice.utils.ByteArray
-
- All Implemented Interfaces:
java.io.Serializable
public class ByteArray extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteArray(byte... underlying)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
byte[]
get()
int
hashCode()
int
length()
boolean
startsWith(byte[] prefixBytes)
static java.lang.Iterable<java.lang.String>
toHexStrings(java.lang.Iterable<ByteArray> arrays)
Translate the each ByteArray in an iterable into a hexidecimal stringjava.lang.String
toString()
-
-
-
Field Detail
-
EMPTY
public static final ByteArray EMPTY
-
-
Method Detail
-
get
public byte[] get()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toHexStrings
public static java.lang.Iterable<java.lang.String> toHexStrings(java.lang.Iterable<ByteArray> arrays)
Translate the each ByteArray in an iterable into a hexidecimal string- Parameters:
arrays
- The array of bytes to translate- Returns:
- An iterable of converted strings
-
length
public int length()
-
startsWith
public boolean startsWith(byte[] prefixBytes)
-
-