public static Chainr fromFile ( File chainrSpecFile , ChainrInstantiator chainrInstantiator ) { Object chainrSpec ; try { FileInputStream fileInputStream = new FileInputStream ( chainrSpecFile ) ; chainrSpec = JsonUtils . jsonToObject ( fileInputStream ) ; } catch ( Exception e ) { throw new RuntimeException ( "Unable to load chainr spec file " + chainrSpecFile . getAbsolutePath ( ) ) ; } return getChainr ( chainrInstantiator , chainrSpec ) ; }
Builds a Chainr instance using the spec described in the File that is passed in .