cdm/src/main/java/ucar/nc2/NetcdfFile.java
public static NetcdfFile openInMemory(String name, byte[] data, String iospClassName) throws IOException, ClassNotFoundException, IllegalAccessException, InstantiationException {

    ucar.unidata.io.InMemoryRandomAccessFile raf = new ucar.unidata.io.InMemoryRandomAccessFile(name, data);
    Class iospClass = NetcdfFile.class.getClassLoader().loadClass(iospClassName);
    IOServiceProvider spi = (IOServiceProvider) iospClass.newInstance();

    return new NetcdfFile(spi, raf, name, null);
  }
public static NetcdfFile openInMemory(String name, byte[] data, String iospClassName) throws IOException, ClassNotFoundException, IllegalAccessException, InstantiationException {

    ucar.unidata.io.InMemoryRandomAccessFile raf = new ucar.unidata.io.InMemoryRandomAccessFile(name, data);
    Class iospClass = NetcdfFile.class.getClassLoader().loadClass(iospClassName);
    IOServiceProvider spi = (IOServiceProvider) iospClass.newInstance();

    return new NetcdfFile(spi, raf, name, null);
  }
Open an in-memory netcdf file, with a specific iosp.

@param name          name of the dataset. Typically use the filename or URI.
@param data          in-memory netcdf file
@param iospClassName fully qualified class name of the IOSP class to handle this file
@return NetcdfFile object, or null if cant find IOServiceProver
@throws IOException            if read error
@throws ClassNotFoundException cannat find iospClassName in the class path
@throws InstantiationException if class cannot be instantiated
@throws IllegalAccessException if class is not accessible