Class ByteArray

  • All Implemented Interfaces:
    java.io.Serializable

    public class ByteArray
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ByteArray EMPTY  
    • 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 string
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • ByteArray

        public ByteArray​(byte... underlying)
    • Method Detail

      • get

        public byte[] get()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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)