clcommon/src/main/java/ucar/nc2/iosp/gini/Giniiosp.java
private Array readData(ucar.nc2.Variable v2, long dataPos, List<Range> ranges,
                         int[] levels) throws IOException, InvalidRangeException {
    // Get to the proper offset and read in the data
    raf.seek(dataPos);
    int data_size = (int) (raf.length() - dataPos);
    byte[] data = new byte[data_size];
    raf.readFully(data);

    // Turn it into an array
    Array array = makeArray(data, levels, v2.getShape());
    return array.sectionNoReduce(ranges);
  }
private Array readData(ucar.nc2.Variable v2, long dataPos, List<Range> ranges,
                         int[] levels) throws IOException, InvalidRangeException {
    // Get to the proper offset and read in the data
    raf.seek(dataPos);
    int data_size = (int) (raf.length() - dataPos);
    byte[] data = new byte[data_size];
    raf.readFully(data);

    // Turn it into an array
    Array array = makeArray(data, levels, v2.getShape());
    return array.sectionNoReduce(ranges);
  }
private Array readData ( ucar . nc2 . Variable v2 , long dataPos , List < Range > ranges , int [ ] levels ) throws IOException , InvalidRangeException { // Get to the proper offset and read in the data raf . seek ( dataPos ) ; int data_size = ( int ) ( raf . length ( ) - dataPos ) ; byte [ ] data = new byte [ data_size ] ; raf . readFully ( data ) ; // Turn it into an array Array array = makeArray ( data , levels , v2 . getShape ( ) ) ; return array . sectionNoReduce ( ranges ) ; }
all the work is here, so can be called recursively
all the work is here so can be called recursively