Class ByteBufChecksum

java.lang.Object
io.netty.handler.codec.compression.ByteBufChecksum
All Implemented Interfaces:
java.util.zip.Checksum
Direct Known Subclasses:
ByteBufChecksum.JdkByteBufChecksum, Crc32c

abstract class ByteBufChecksum extends java.lang.Object implements java.util.zip.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 Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final ByteProcessor
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    update(ByteBuf b, int off, int len)
     
    (package private) static ByteBufChecksum
    wrapChecksum(java.util.zip.Checksum checksum)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.zip.Checksum

    getValue, reset, update, update
  • Field Details

  • Constructor Details

    • ByteBufChecksum

      ByteBufChecksum()
  • Method Details

    • wrapChecksum

      static ByteBufChecksum wrapChecksum(java.util.zip.Checksum checksum)
    • update

      public void update(ByteBuf b, int off, int len)
      See Also:
      • Checksum.update(byte[], int, int)