Class ByteArrayPool
java.lang.Object
com.inductiveautomation.ignition.common.util.ByteArrayPool
A pool of byte[]. When allocationThresholdEnabled==true, arrays with length <= allocationThreshold will be directly
 allocated and returning them will have no effect.
- 
Constructor SummaryConstructorsConstructorDescriptionByteArrayPool(boolean allocationThresholdEnabled) ByteArrayPool(int allocationThreshold) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidreturnArray(byte[] array) Return a taken byte[] to the pool.byte[]takeArray(int length) Take a byte[] with the specified length from the pool, or returns a directly allocated one if length <= allocationThreshold and allocationThresholdEnabled==true.
- 
Constructor Details- 
ByteArrayPoolpublic ByteArrayPool()
- 
ByteArrayPoolpublic ByteArrayPool(boolean allocationThresholdEnabled) 
- 
ByteArrayPoolpublic ByteArrayPool(int allocationThreshold) 
 
- 
- 
Method Details- 
takeArraypublic byte[] takeArray(int length) Take a byte[] with the specified length from the pool, or returns a directly allocated one if length <= allocationThreshold and allocationThresholdEnabled==true.- Parameters:
- length- Desired length.
- Returns:
- byte[] of requested length.
 
- 
returnArraypublic void returnArray(byte[] array) Return a taken byte[] to the pool.- Parameters:
- array- byte[] to return.
 
 
-