I receive a long
value from C (that is from JNI/JNA). I want to create a byte[]
array of that size.
Which exception should I throw if this value exceeds the maximum size of arrays?
In other words, which exception should I throw in the following?
long output_len;
...
if(output_len > Integer.MAX_VALUE)
throw new ...();