Class DefaultMessageSizeEstimator

java.lang.Object
io.netty.channel.DefaultMessageSizeEstimator
All Implemented Interfaces:
MessageSizeEstimator

public final class DefaultMessageSizeEstimator extends Object implements MessageSizeEstimator
Default MessageSizeEstimator implementation which supports the estimation of the size of ByteBuf, ByteBufHolder and FileRegion.
  • Field Details

    • DEFAULT

      public static final MessageSizeEstimator DEFAULT
      Return the default implementation which returns 8 for unknown messages.
  • Constructor Details

    • DefaultMessageSizeEstimator

      public DefaultMessageSizeEstimator(int unknownSize)
      Create a new instance
      Parameters:
      unknownSize - The size which is returned for unknown messages.
  • Method Details