Code example for BitSet

Methods: cardinality

0
  protected void initialize() { 
    ObjectInputStream is = null;
    try { 
      is = new ObjectInputStream(new FileInputStream(_path));
      _bits = (BitSet) is.readObject();
      _count.set(_bits.cardinality());
    } catch (Throwable e) {
      e.printStackTrace();
    } finally { 
      if (null != is) {
        try { 
	  is.close();
        } catch (Throwable e) {
	  e.printStackTrace();
        } 
      } 
    } 
    _checking_thread.setDaemon(true);
    _checking_thread.start();
    _saving_timer.schedule(new Saving(), 2 * 60 * 1000, 2 * 60 * 1000);
Experience pair programming with AI  Get Codota for Java