Package org.rabinfingerprint.fingerprint

Examples of org.rabinfingerprint.fingerprint.RabinFingerprintLongWindowed.pushByte()


    // Create a windowed fingerprint object with a window size of 48 bytes.
    RabinFingerprintLongWindowed window = new RabinFingerprintLongWindowed(polynomial, 48);
    for (byte b : ByteStreams.toByteArray(new FileInputStream("file.test"))) {
      // Push in one byte. Old bytes are automatically popped.
      window.pushByte(b);

      // Output current window's fingerprint
      System.out.println(Long.toString(window.getFingerprintLong(), 16));
    }
  }
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.