cdm/src/main/java/ucar/nc2/iosp/IospHelper.java
static public Object readDataFill(RandomAccessFile raf, Layout index, DataType dataType, Object fillValue,
                                    int byteOrder) throws java.io.IOException {
    Object arr = (fillValue == null) ? makePrimitiveArray((int) index.getTotalNelems(), dataType) :
            makePrimitiveArray((int) index.getTotalNelems(), dataType, fillValue);
    return readData(raf, index, dataType, arr, byteOrder, true);
  }
static public Object readDataFill(RandomAccessFile raf, Layout index, DataType dataType, Object fillValue,
                                    int byteOrder) throws java.io.IOException {
    Object arr = (fillValue == null) ? makePrimitiveArray((int) index.getTotalNelems(), dataType) :
            makePrimitiveArray((int) index.getTotalNelems(), dataType, fillValue);
    return readData(raf, index, dataType, arr, byteOrder, true);
  }
Read data subset from RandomAccessFile, create primitive array of size Layout.getTotalNelems.
Reading is controlled by the Layout object.

@param raf       read from here.
@param index     handles skipping around in the file.
@param dataType  dataType of the variable
@param fillValue must be Number if dataType.isNumeric(), or String for STRING, byte[] for Structure, or null for none
@param byteOrder if equal to RandomAccessFile.ORDER_XXXX, set the byte order just before reading
@return primitive array with data read in
@throws java.io.IOException on read error