Class BasePVUByteArray

    • Field Detail

      • value

        protected byte[] value
    • Constructor Detail

      • BasePVUByteArray

        public BasePVUByteArray​(ScalarArray array)
        Constructor.
        Parameters:
        array - The introspection interface.
    • Method Detail

      • get

        public int get​(int offset,
                       int len,
                       ByteArrayData data)
        Description copied from interface: PVUByteArray
        Get values from a PVByteArray and put them into byte[]from.
        Specified by:
        get in interface PVUByteArray
        Parameters:
        offset - the offset to the first element to get
        len - the maximum number of elements to transfer
        data - the class containing the data and an offset into the data. Get sets these values. The caller must do the actual data transfer.
        Returns:
        the number of elements that can be transfered. This is always less than or equal to length. If the value is less then length then get should be called again. If the return value is greater than 0 then data.data is a reference to the array and data.offset is the offset into the array.
      • get

        public org.epics.util.array.ArrayUByte get()
        Description copied from interface: PVUByteArray
        Returns an unmodifiable view of the data.
        Specified by:
        get in interface PVNumberArray
        Specified by:
        get in interface PVUByteArray
        Returns:
        an unmodifiable view of the data
      • put

        public int put​(int offset,
                       int len,
                       byte[] from,
                       int fromOffset)
        Description copied from interface: PVUByteArray
        Put values into a PVByteArray from byte[]to.
        Specified by:
        put in interface PVUByteArray
        Parameters:
        offset - the offset to the first element to put
        len - the maximum number of elements to transfer
        from - the array from which to get the data
        fromOffset - The offset into from
        Returns:
        the number of elements transfered. This is always less then length than or equal to length. If the value is less than the length then put should be called again.
      • shareData

        public void shareData​(byte[] from)
        Description copied from interface: PVUByteArray
        Share the data from caller. The capacity and length are taken from the array and this array is made immutable. This should only be used to share immutable data.
        Specified by:
        shareData in interface PVUByteArray
        Parameters:
        from - the data to share
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object