question: private void loadBinary ( ByteBuffer bb ) throws IOException { if ( bb . getInt ( ) != MAGIC ) { throw new Error ( "Bad magic in db" ) ; } if ( bb . getInt ( ) != VERSION ) { throw new Error ( "Bad VERSION in db" ) ; } continuityWeight = bb . getInt ( ) ; optimalCoupling = bb . getInt ( ) ; extendSelections = bb . getInt ( ) ; joinMethod = bb . getInt ( ) ; joinWeightShift = bb . getInt ( ) ; int weightLength = bb . getInt ( ) ; joinWeights = new int [ weightLength ] ; for ( int i = 0 ; i < joinWeights . length ; i ++ ) { joinWeights [ i ] = bb . getInt ( ) ; } int unitsLength = bb . getInt ( ) ; units = new DatabaseClusterUnit [ unitsLength ] ; for ( int i = 0 ; i < units . length ; i ++ ) { units [ i ] = new DatabaseClusterUnit ( bb ) ; } int unitTypesLength = bb . getInt ( ) ; unitTypes = new UnitType [ unitTypesLength ] ; for ( int i = 0 ; i < unitTypes . length ; i ++ ) { unitTypes [ i ] = new UnitType ( bb ) ; } sts = new SampleSet ( bb ) ; mcep = new SampleSet ( bb ) ; int numCarts = bb . getInt ( ) ; cartMap = new HashMap ( ) ; for ( int i = 0 ; i < numCarts ; i ++ ) { String name = Utilities . getString ( bb ) ; CART cart = CARTImpl . loadBinary ( bb ) ; cartMap . put ( name , cart ) ; if ( defaultCart == null ) { defaultCart = cart ; } } }
target:  Loads the database from the given byte buffer.