tds/src/main/java/thredds/server/opendap/NcSDCharArray.java
public boolean read(String datasetName, Object specialO) throws IOException {
    boolean hasStride = false;
    Array a;
    try {

      if (debugRead) {
        System.out.println("NcSDCharArray read " + ncVar.getFullName());
        for (int i = 0; i < numDimensions(); i++) {
          DArrayDimension d = getDimension(i);
          System.out.println(" " + d.getEncodedName() + " " + getStart(i) + " " + getStop(i) + " " + getStride(i));
        }
      }

      // set up the netcdf read
      int n = numDimensions();
      int[] origin = new int[n + 1];
      int[] shape = new int[n + 1];

      for (int i = 0; i < n; i++) {
        origin[i] = getStart(i);
        shape[i] = getStop(i) - getStart(i) + 1;
        hasStride = hasStride || (getStride(i) > 1);
      }
      origin[n] = 0;
      shape[n] = strLen;

      a = ncVar.read(origin, shape);
      if (debugRead) System.out.println("  Read = " + a.getSize() + " elems of type = " + a.getElementType());

      // deal with strides using a section
      if (hasStride) {
        List<Range> ranges = new ArrayList<>();
        for (int i = 0; i < n; i++) {
          int s = getStride(i);
          if (s > 1) {  // otherwise null, means "take all elements"
            ranges.add(new Range(0, shape[i], s));
            if (debugRead) System.out.println(" Section dim " + i + " stride = " + s);
          }
        }
        ranges.add(null); //  get all
        a = a.section(ranges);
        if (debugRead) System.out.println("   section size " + a.getSize());
      }

    } catch (InvalidDimensionException e) {
      log.error("read char array", e);
      throw new IllegalStateException("NcSDCharArray InvalidDimensionException");
    } catch (InvalidRangeException e) {
      log.error("read char array", e);
      throw new IllegalStateException("NcSDCharArray InvalidRangeException");
    }

    setData(a);
    return (false);
  }
public boolean read(String datasetName, Object specialO) throws IOException {
    boolean hasStride = false;
    Array a;
    try {

      if (debugRead) {
        System.out.println("NcSDCharArray read " + ncVar.getFullName());
        for (int i = 0; i < numDimensions(); i++) {
          DArrayDimension d = getDimension(i);
          System.out.println(" " + d.getEncodedName() + " " + getStart(i) + " " + getStop(i) + " " + getStride(i));
        }
      }

      // set up the netcdf read
      int n = numDimensions();
      int[] origin = new int[n + 1];
      int[] shape = new int[n + 1];

      for (int i = 0; i < n; i++) {
        origin[i] = getStart(i);
        shape[i] = getStop(i) - getStart(i) + 1;
        hasStride = hasStride || (getStride(i) > 1);
      }
      origin[n] = 0;
      shape[n] = strLen;

      a = ncVar.read(origin, shape);
      if (debugRead) System.out.println("  Read = " + a.getSize() + " elems of type = " + a.getElementType());

      // deal with strides using a section
      if (hasStride) {
        List<Range> ranges = new ArrayList<>();
        for (int i = 0; i < n; i++) {
          int s = getStride(i);
          if (s > 1) {  // otherwise null, means "take all elements"
            ranges.add(new Range(0, shape[i], s));
            if (debugRead) System.out.println(" Section dim " + i + " stride = " + s);
          }
        }
        ranges.add(null); //  get all
        a = a.section(ranges);
        if (debugRead) System.out.println("   section size " + a.getSize());
      }

    } catch (InvalidDimensionException e) {
      log.error("read char array", e);
      throw new IllegalStateException("NcSDCharArray InvalidDimensionException");
    } catch (InvalidRangeException e) {
      log.error("read char array", e);
      throw new IllegalStateException("NcSDCharArray InvalidRangeException");
    }

    setData(a);
    return (false);
  }
public boolean read ( String datasetName , Object specialO ) throws IOException { boolean hasStride = false ; Array a ; try { if ( debugRead ) { System . out . println ( "NcSDCharArray read " + ncVar . getFullName ( ) ) ; for ( int i = 0 ; i < numDimensions ( ) ; i ++ ) { DArrayDimension d = getDimension ( i ) ; System . out . println ( " " + d . getEncodedName ( ) + " " + getStart ( i ) + " " + getStop ( i ) + " " + getStride ( i ) ) ; } } // set up the netcdf read int n = numDimensions ( ) ; int [ ] origin = new int [ n + 1 ] ; int [ ] shape = new int [ n + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { origin [ i ] = getStart ( i ) ; shape [ i ] = getStop ( i ) - getStart ( i ) + 1 ; hasStride = hasStride || ( getStride ( i ) > 1 ) ; } origin [ n ] = 0 ; shape [ n ] = strLen ; a = ncVar . read ( origin , shape ) ; if ( debugRead ) System . out . println ( "  Read = " + a . getSize ( ) + " elems of type = " + a . getElementType ( ) ) ; // deal with strides using a section if ( hasStride ) { List < Range > ranges = new ArrayList <> ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int s = getStride ( i ) ; if ( s > 1 ) { // otherwise null, means "take all elements" ranges . add ( new Range ( 0 , shape [ i ] , s ) ) ; if ( debugRead ) System . out . println ( " Section dim " + i + " stride = " + s ) ; } } ranges . add ( null ) ; //  get all a = a . section ( ranges ) ; if ( debugRead ) System . out . println ( "   section size " + a . getSize ( ) ) ; } } catch ( InvalidDimensionException e ) { log . error ( "read char array" , e ) ; throw new IllegalStateException ( "NcSDCharArray InvalidDimensionException" ) ; } catch ( InvalidRangeException e ) { log . error ( "read char array" , e ) ; throw new IllegalStateException ( "NcSDCharArray InvalidRangeException" ) ; } setData ( a ) ; return ( false ) ; }
Read the data values (parameters are ignored).
Use the start, stop and stride values that were set by the constraint evaluator.

@param datasetName not used
@param specialO    not used
@return false (no more data to be read)
@throws IOException
@throws EOFException
Read the data values ( parameters are ignored ) . Use the start stop and stride values that were set by the constraint evaluator .