code: public static long getOffset(DataBuffer shapeInformation, int row, int col) {
          int rank = rank(shapeInformation);
          if (rank != 2)
              throw new IllegalArgumentException(
                      "Cannot use this getOffset method on arrays of rank != 2 (rank is: " + rank + ")");
          return getOffsetUnsafe(shapeInformation, row, col);
      }
docs: Get the offset of the specified [row,col] for the 2d array
  
  @param shapeInformation    Shape information
  @param row                 Row index to get the offset for
  @param col                 Column index to get the offset for
  @return                    Buffer offset