Top Description Fields Constructors Methods
io.netty5.handler.codec.compression

pack-priv Class BufferChecksum

extends Object
implements Checksum
Class Inheritance
All Implemented Interfaces
java.util.zip.Checksum
Known Direct Subclasses
io.netty5.handler.codec.compression.Crc32c, io.netty5.handler.codec.compression.Lz4XXHash32
Imports
io.netty5.buffer.Buffer, java.nio.ByteBuffer, java.util.zip.Checksum

Checksum implementation which can directly act on a Buffer.

Field Summary

Modifier and TypeField and Description
private 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.
public void
update(Buffer b, int off, int len)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

checksumback to summary
private final Checksum checksum

Constructor Detail

BufferChecksumback to summary
pack-priv BufferChecksum(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
updateback to summary
public void update(Buffer b, int off, int len)
See Also
update(byte[], int, int)