Package org.epics.pvdata.pv
Interface PVStringArray
-
- All Superinterfaces:
PVArray,PVField,PVScalarArray,Serializable,SerializableArray
- All Known Implementing Classes:
BasePVStringArray
public interface PVStringArray extends PVScalarArray
Get/put a String array. The caller must be prepared to get/put the array in chunks. The return argument is always the number of elements that were transfered. It may be less than the number requested.- Author:
- mrk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intget(int offset, int length, StringArrayData data)Get values from a PVStringArray and put them into String[]to.intput(int offset, int length, String[] from, int fromOffset)Put values into a PVStringArray from String[]from.voidshareData(String[] from)Share the data from caller.-
Methods inherited from interface org.epics.pvdata.pv.PVArray
getArray, getCapacity, getLength, isCapacityMutable, setCapacity, setCapacityMutable, setLength
-
Methods inherited from interface org.epics.pvdata.pv.PVField
getField, getFieldName, getFieldOffset, getFullName, getNextFieldOffset, getNumberFields, getParent, isImmutable, postPut, setImmutable, setPostHandler, toString, toString, toString
-
Methods inherited from interface org.epics.pvdata.pv.PVScalarArray
getScalarArray
-
Methods inherited from interface org.epics.pvdata.pv.Serializable
deserialize, serialize
-
Methods inherited from interface org.epics.pvdata.pv.SerializableArray
serialize
-
-
-
-
Method Detail
-
get
int get(int offset, int length, StringArrayData data)Get values from a PVStringArray and put them into String[]to.- Parameters:
offset- The offset to the first element to get.length- 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 than the length then put 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.
-
put
int put(int offset, int length, String[] from, int fromOffset)Put values into a PVStringArray from String[]from.- Parameters:
offset- The offset to the first element to put.length- 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 than or equal to length. If the value is less then length then put should be called again.
- Throws:
IllegalStateException- if the field is not mutable.
-
shareData
void shareData(String[] from)
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.- Parameters:
from- The data to share.
-
-