cdm/src/main/java/ucar/nc2/Variable.java
protected Array _read(Section section) throws IOException, InvalidRangeException {
    // check if its really a full read
    if ((null == section) || section.computeSize() == getSize())
      return _read();

    // full read was cached
    if (isCaching()) {
      if (cache.data == null) {
        setCachedData(_read()); // read and cache entire array
        if (debugCaching) System.out.println("cache " + getFullName());
      }
      if (debugCaching) System.out.println("got data from cache " + getFullName());
      return cache.data.sectionNoReduce(section.getRanges()).copy(); // subset it, return copy
    }

    return proxyReader.reallyRead(this, section, null);
  }
protected Array _read(Section section) throws IOException, InvalidRangeException {
    // check if its really a full read
    if ((null == section) || section.computeSize() == getSize())
      return _read();

    // full read was cached
    if (isCaching()) {
      if (cache.data == null) {
        setCachedData(_read()); // read and cache entire array
        if (debugCaching) System.out.println("cache " + getFullName());
      }
      if (debugCaching) System.out.println("got data from cache " + getFullName());
      return cache.data.sectionNoReduce(section.getRanges()).copy(); // subset it, return copy
    }

    return proxyReader.reallyRead(this, section, null);
  }
protected Array _read ( Section section ) throws IOException , InvalidRangeException { // check if its really a full read if ( ( null == section ) || section . computeSize ( ) == getSize ( ) ) return _read ( ) ; // full read was cached if ( isCaching ( ) ) { if ( cache . data == null ) { setCachedData ( _read ( ) ) ; // read and cache entire array if ( debugCaching ) System . out . println ( "cache " + getFullName ( ) ) ; } if ( debugCaching ) System . out . println ( "got data from cache " + getFullName ( ) ) ; return cache . data . sectionNoReduce ( section . getRanges ( ) ) . copy ( ) ; // subset it, return copy } return proxyReader . reallyRead ( this , section , null ) ; }
assume filled, validated Section
assume filled validated Section