Examples of pushByte()


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

     * file won't effect the chunk boundaries
     */
    for (byte b : ByteStreams.toByteArray(is)) {
      // push byte into fingerprints
      window.pushByte(b);
      finger.pushByte(b);
      chunkEnd++;

      /*
       * if we've reached a boundary (which we will at some probability
       * based on the boundary pattern and the size of the fingerprint
View Full Code Here

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.