Interface BinarySettable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void set​(byte[] value)
      Sets the container to the given binary data.
      void set​(byte[] data, int offset, int length)
      Sets the container to a subsequence of the given binary data.
      void setRef​(byte[] ref)
      Sets the container to the given byte array reference.
    • Method Detail

      • set

        void set​(byte[] value)
        Sets the container to the given binary data.

        The input array is copied to prevent later modification of the value that is set. To avoid this overhead and prevent the data copy, use the setRef(byte[]) method instead.

        Parameters:
        value - binary value to which to set the container
      • setRef

        void setRef​(byte[] ref)
        Sets the container to the given byte array reference.

        While this call avoids the overhead seen with set(byte[]), the caller must guarantee that the input array will not be modified subsequent to this call. Failure to comply may result in the dataflow exhibiting unexpected behavior.

        Parameters:
        ref - binary value to which to set the container
      • set

        void set​(byte[] data,
                 int offset,
                 int length)
        Sets the container to a subsequence of the given binary data. The specified subsequence is copied from the input array.
        Parameters:
        data - binary data containing the subsequence to which to set the container
        offset - starting offset of the subsequence
        length - length of the subsequence, in bytes