Class RawData

    • Constructor Detail

      • RawData

        public RawData()

        Constructs an empty data object.

      • RawData

        public RawData​(byte[] data)

        Constructs a raw data object that holds the given byte array.

        Parameters:
        data - The rank to set.
    • Method Detail

      • serialize

        public void serialize​(com.yahoo.vespa.objects.Serializer buf)

        Serializes the content of this data into the given byte buffer.

        Parameters:
        buf - The buffer to serialize to.
      • deserialize

        public void deserialize​(com.yahoo.vespa.objects.Deserializer buf)

        Deserializes the content for this data from the given byte buffer.

        Parameters:
        buf - The buffer to deserialize from.
      • getData

        public byte[] getData()

        Returns the byte array that constitutes this data.

        Returns:
        The byte array.
      • setData

        public RawData setData​(byte[] data)

        Sets the byte array that constitutes this data. This does not copy the given array, it simply assigns it to this.

        Parameters:
        data - The data to set.
        Returns:
        This, to allow chaining.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • compare

        public static int compare​(byte[] lhs,
                                  byte[] rhs)

        Implements comparison of two byte arrays.

        Parameters:
        lhs - The left-hand-side of the comparison.
        rhs - The right-hand-side of the comparison.
        Returns:
        The result of comparing the two byte arrays.