cdm/src/main/java/ucar/nc2/Variable.java
public void setCachedData(Array cacheData, boolean isMetadata) {
    if ((cacheData != null) && (cacheData.getElementType() != getDataType().getPrimitiveClassType()))
      throw new IllegalArgumentException("setCachedData type=" + cacheData.getElementType() + " incompatible with variable type=" + getDataType());

    this.cache.data = cacheData;
    this.isMetadata = isMetadata;
    this.cache.cachingSet = true;
    this.cache.isCaching = true;
  }
public void setCachedData(Array cacheData, boolean isMetadata) {
    if ((cacheData != null) && (cacheData.getElementType() != getDataType().getPrimitiveClassType()))
      throw new IllegalArgumentException("setCachedData type=" + cacheData.getElementType() + " incompatible with variable type=" + getDataType());

    this.cache.data = cacheData;
    this.isMetadata = isMetadata;
    this.cache.cachingSet = true;
    this.cache.isCaching = true;
  }
public void setCachedData ( Array cacheData , boolean isMetadata ) { if ( ( cacheData != null ) && ( cacheData . getElementType ( ) != getDataType ( ) . getPrimitiveClassType ( ) ) ) throw new IllegalArgumentException ( "setCachedData type=" + cacheData . getElementType ( ) + " incompatible with variable type=" + getDataType ( ) ) ; this . cache . data = cacheData ; this . isMetadata = isMetadata ; this . cache . cachingSet = true ; this . cache . isCaching = true ; }
Set the data cache

@param cacheData  cache this Array
@param isMetadata : synthesized data, set true if must be saved in NcML output (ie data not actually in the file).
Set the data cache