*
* @see org.apache.uima.jcas.JCas#checkArrayBounds(int, int)
*/
public final void checkArrayBounds(int fsRef, int pos) {
if (NULL == fsRef) {
LowLevelException e = new LowLevelException(LowLevelException.NULL_ARRAY_ACCESS);
// note - need to add this to ll_runtimeException
e.addArgument(Integer.toString(pos));
throw e;
}
final int arrayLength = casImpl.ll_getArraySize(fsRef);
if (pos < 0 || pos >= arrayLength) {
LowLevelException e = new LowLevelException(LowLevelException.ARRAY_INDEX_OUT_OF_RANGE);
e.addArgument(Integer.toString(pos));
throw e;
}
}