private static ChaincodeCollectionConfiguration fromFile(File configFile, boolean isJson) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException {

        // Sanity check
        if (configFile == null) {
            throw new InvalidArgumentException("configFile must be specified");
        }

        if (logger.isTraceEnabled()) {
            logger.trace(format("ChaincodeCollectionConfiguration.fromFile: %s  isJson = %b", configFile.getAbsolutePath(), isJson));
        }

        // Json file
        try (InputStream stream = new FileInputStream(configFile)) {
            return isJson ? fromJsonStream(stream) : fromYamlStream(stream);
        }

    }
private static ChaincodeCollectionConfiguration fromFile ( File configFile , boolean isJson ) throws InvalidArgumentException , IOException , ChaincodeCollectionConfigurationException { if ( configFile == null ) { throw new InvalidArgumentException ( "configFile must be specified" ) ; } if ( logger . isTraceEnabled ( ) ) { logger . trace ( format ( "ChaincodeCollectionConfiguration.fromFile: %s  isJson = %b" , configFile . getAbsolutePath ( ) , isJson ) ) ; } try ( InputStream stream = new FileInputStream ( configFile ) ) { return isJson ? fromJsonStream ( stream ) : fromYamlStream ( stream ) ; } }
Loads a ChaincodeCollectionConfiguration object from a Json or Yaml file