docs: static public int asIntValue(byte[] array, int offset, int length) {
  
          if (null == array || array.length <= offset) {
              return -1;
          }
  
          int intVal = 0;
          int mark = 1;
          int digit;
          int i = offset + length - 1;
          // PK16337 - ignore trailing whitespace
          for (; offset <= i; i--) {
              char c = (char) array[i];
              if (BNFHeaders.SPACE != c && BNFHeaders.TAB != c) {
                  break;
              }
          }
          for (; offset <= i; i--) {
              digit = array[i] - ZERO;
              if (0 > digit || 9 < digit) {
                  // stop on any nondigit, if it's not a DASH then throw an exc
                  if (DASH != array[i]) {
                      throw new NumberFormatException("Invalid digit: " + array[i]);
                  }
                  break;
              }
              intVal += digit * mark;
              mark *= 10;
          }
  
          // check for negative numbers
          if (offset <= i && array[i] == DASH) {
              intVal = -intVal;
          }
  
          return intVal;
      }