if (arr == null)
{
throw new NullPointerException("Byte array is null");
}
if (offset < 0)
{
throw new IndexOutOfBoundsException("Offset to byte array is out of bounds: offset = " + offset + ", array.length = " + arr.length);
}
//Empty Byte Array
if (offset >= arr.length)
{
value = null;
return;
}
int len = arr.length - offset;
value = new byte[len];
System.arraycopy(arr, offset, value, 0, len);