Package com.moesol.geoserver.sync.core

Examples of com.moesol.geoserver.sync.core.XorAccumulator.update()


  public void testUpdate() {
    XorAccumulator a = new XorAccumulator();
    byte[] v = new byte[20];
    v[0] = 1;
    a.update(v);
    assertEquals("0100000000000000000000000000000000000000", a.toString());
   
    v[19] = 1;
    a.update(v);
    assertEquals("0000000000000000000000000000000000000001", a.toString());
View Full Code Here


    v[0] = 1;
    a.update(v);
    assertEquals("0100000000000000000000000000000000000000", a.toString());
   
    v[19] = 1;
    a.update(v);
    assertEquals("0000000000000000000000000000000000000001", a.toString());
  }

  public void testToString() {
    XorAccumulator a = new XorAccumulator();
View Full Code Here

    XorAccumulator result = new XorAccumulator();
    long st = System.currentTimeMillis();
    for (String s : smallSet) {
      byte[] elSha1 = m_sha1.digest(s.getBytes());
      m_sha1.reset();
      result.update(elSha1);
    }
    if (DEBUG) {
      System.out.println(result);
    }
    long e = System.currentTimeMillis();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.