public class PrimitiveDataChecksum
extends java.lang.Object
implements java.util.zip.Checksum
Constructor and Description |
---|
PrimitiveDataChecksum(java.util.zip.Checksum checksum) |
Modifier and Type | Method and Description |
---|---|
long |
getValue() |
void |
reset() |
void |
update(byte[] numbers)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
update(byte[] b,
int off,
int len) |
void |
update(double[] numbers)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
update(float[] numbers)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
update(int b) |
void |
update(int[] numbers)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
update(long[] numbers)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
update(short[] numbers)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
updateBoolean(boolean value)
updates a byte with 0 for false and 1 for true
|
void |
updateDouble(double number) |
void |
updateFloat(float number) |
void |
updateInt(int number) |
void |
updateLong(long number) |
void |
updateShort(short number) |
void |
updateUtf8(java.lang.String string)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
void |
updateUtf8(java.lang.String[] strings)
Note: leaves the checksum untouched if given value is null (provide a special value for stronger hashing).
|
public PrimitiveDataChecksum(java.util.zip.Checksum checksum)
public void update(int b)
update
in interface java.util.zip.Checksum
public void update(byte[] b, int off, int len)
update
in interface java.util.zip.Checksum
public long getValue()
getValue
in interface java.util.zip.Checksum
public void reset()
reset
in interface java.util.zip.Checksum
public void updateUtf8(java.lang.String string)
public void updateUtf8(java.lang.String[] strings)
public void updateBoolean(boolean value)
public void updateShort(short number)
public void updateInt(int number)
public void updateLong(long number)
public void updateFloat(float number)
public void updateDouble(double number)
public void update(byte[] numbers)
public void update(short[] numbers)
public void update(int[] numbers)
public void update(long[] numbers)
public void update(float[] numbers)
public void update(double[] numbers)
Available under the Apache License, Version 2.0 - Copyright © 2012-2016 greenrobot.org. All Rights Reserved.