Top Description Inners Fields Constructors Methods
io.netty.handler.codec.compression

pack-priv abstract Class ByteBufChecksum

extends Object
implements Checksum
Class Inheritance
All Implemented Interfaces
java.util.zip.Checksum
Known Direct Subclasses
io.netty.handler.codec.compression.ByteBufChecksum.SlowByteBufChecksum, io.netty.handler.codec.compression.Crc32c, io.netty.handler.codec.compression.Lz4XXHash32
Imports
io.netty.buffer.ByteBuf, io.netty.util.ByteProcessor, io.netty.util.internal.ObjectUtil, .PlatformDependent, java.lang.reflect.Method, java.nio.ByteBuffer, java.util.zip.Adler32, .CRC32, .Checksum

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.

Nested and Inner Type Summary

Modifier and TypeClass 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.

Field Summary

Modifier and TypeField and Description
private final ByteProcessor

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
update(ByteBuf b, int off, int len)

private static Method
pack-priv static ByteBufChecksum
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

updateProcessorback to summary
private final ByteProcessor updateProcessor

Constructor Detail

ByteBufChecksumback to summary
pack-priv ByteBufChecksum()

Method Detail

updateback to summary
public void update(ByteBuf b, int off, int len)
See Also
update(byte[], int, int)
updateByteBufferback to summary
private static Method updateByteBuffer(Checksum checksum)
wrapChecksumback to summary
pack-priv static ByteBufChecksum wrapChecksum(Checksum checksum)
io.netty.handler.codec.compression back to summary

private final Class ByteBufChecksum.ReflectiveByteBufChecksum

extends SlowByteBufChecksum
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Method
Inherited from io.netty.handler.codec.compression.ByteBufChecksum.SlowByteBufChecksum:
checksum

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from io.netty.handler.codec.compression.ByteBufChecksum.SlowByteBufChecksum:
getValueresetupdateupdate

Field Detail

methodback to summary
private final Method method

Constructor Detail

ReflectiveByteBufChecksumback to summary
pack-priv ReflectiveByteBufChecksum(Checksum checksum, Method method)

Method Detail

updateback to summary
public void update(ByteBuf b, int off, int len)

Overrides io.netty.handler.codec.compression.ByteBufChecksum.update.

Annotations
@Override
io.netty.handler.codec.compression back to summary

private Class ByteBufChecksum.SlowByteBufChecksum

extends ByteBufChecksum
Class Inheritance
Known Direct Subclasses
io.netty.handler.codec.compression.ByteBufChecksum.ReflectiveByteBufChecksum

Field Summary

Modifier and TypeField and Description
protected final Checksum

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
getValue()

Implements java.util.zip.Checksum.getValue.

Returns the current checksum value.
public void
reset()

Implements java.util.zip.Checksum.reset.

Resets the checksum to its initial value.
public void
update(int
the byte to update the checksum with
b
)

Implements java.util.zip.Checksum.update.

Updates the current checksum with the specified byte.
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.util.zip.Checksum.update.

Updates the current checksum with the specified array of bytes.
Inherited from io.netty.handler.codec.compression.ByteBufChecksum:
updatewrapChecksum

Field Detail

checksumback to summary
protected final Checksum checksum

Constructor Detail

SlowByteBufChecksumback to summary
pack-priv SlowByteBufChecksum(Checksum checksum)

Method Detail

getValueback to summary
public long getValue()

Implements java.util.zip.Checksum.getValue.

Doc from java.util.zip.Checksum.getValue.

Returns the current checksum value.

Returns:long

the current checksum value

Annotations
@Override
resetback to summary
public void reset()

Implements java.util.zip.Checksum.reset.

Doc from java.util.zip.Checksum.reset.

Resets the checksum to its initial value.

Annotations
@Override
updateback to summary
public void update(int b)

Implements java.util.zip.Checksum.update.

Doc from java.util.zip.Checksum.update.

Updates the current checksum with the specified byte.

Parameters
b:int

the byte to update the checksum with

Annotations
@Override
updateback to summary
public void update(byte[] b, int off, int len)

Implements java.util.zip.Checksum.update.

Doc from java.util.zip.Checksum.update.

Updates the current checksum with the specified array of bytes.

Parameters
b:byte[]

the byte array to update the checksum with

off:int

the start offset of the data

len:int

the number of bytes to use for the update

Annotations
@Override
io.netty.handler.codec.compression back to summary

private Class ByteBufChecksum.ZlibChecksumMethods

extends Object
Class Inheritance
  • java.lang.Object
  • io.netty.handler.codec.compression.ByteBufChecksum.ZlibChecksumMethods

on OpenJDK Adler32 and CRC32 both calls ZipUtils.loadLibrary on class init.

Field Summary

Modifier and TypeField and Description
private static final Method
private static final Method

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ADLER32_UPDATE_METHODback to summary
private static final Method ADLER32_UPDATE_METHOD
CRC32_UPDATE_METHODback to summary
private static final Method CRC32_UPDATE_METHOD

Constructor Detail

ZlibChecksumMethodsback to summary
private ZlibChecksumMethods()