Checksum implementation which can directly act on a ByteBuf.
Implementations may optimize access patterns depending on if the ByteBuf is backed by a
byte array (ByteBuf#hasArray() is true) or not.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | ByteBufChecksum.ZlibChecksumMethods
on OpenJDK Adler32 and CRC32 both calls ZipUtils.loadLibrary on class init. |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteProcessor |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private static Method | |
| pack-priv static ByteBufChecksum |
| updateProcessor | back to summary |
|---|---|
| private final ByteProcessor updateProcessor | |
| ByteBufChecksum | back to summary |
|---|---|
| pack-priv ByteBufChecksum() | |
| update | back to summary |
|---|---|
public void update(ByteBuf b, int off, int len)
| |
| updateByteBuffer | back to summary |
|---|---|
| private static Method updateByteBuffer(Checksum checksum) | |
| wrapChecksum | back to summary |
|---|---|
| pack-priv static ByteBufChecksum wrapChecksum(Checksum checksum) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Method |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | update(ByteBuf b, int off, int len)
Overrides io. |
| method | back to summary |
|---|---|
| private final Method method | |
| ReflectiveByteBufChecksum | back to summary |
|---|---|
| pack-priv ReflectiveByteBufChecksum(Checksum checksum, Method method) | |
| update | back to summary |
|---|---|
| public void update(ByteBuf b, int off, int len) Overrides io.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public void | |
| public void | update(int
the byte to update the checksum with b)Implements java. |
| public void | update(byte[]
the byte array to update the checksum with b, int the start offset of the data off, int the number of bytes to use for the update len)Implements java. |
| checksum | back to summary |
|---|---|
| protected final Checksum checksum | |
| SlowByteBufChecksum | back to summary |
|---|---|
| pack-priv SlowByteBufChecksum(Checksum checksum) | |
| getValue | back to summary |
|---|---|
| public long getValue() Implements java. Doc from java. Returns the current checksum value.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements java. Doc from java. Resets the checksum to its initial value.
| |
| update | back to summary |
|---|---|
| public void update(int b) Implements java. Doc from java. Updates the current checksum with the specified byte.
| |
| update | back to summary |
|---|---|
| public void update(byte[] b, int off, int len) Implements java. Doc from java. Updates the current checksum with the specified array of bytes.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final Method | |
| private static final Method |
| Access | Constructor and Description |
|---|---|
| private |
| ADLER32_UPDATE_METHOD | back to summary |
|---|---|
| private static final Method ADLER32_UPDATE_METHOD | |
| CRC32_UPDATE_METHOD | back to summary |
|---|---|
| private static final Method CRC32_UPDATE_METHOD | |
| ZlibChecksumMethods | back to summary |
|---|---|
| private ZlibChecksumMethods() | |