java.lang.Object
org.opendaylight.protocol.bgp.flowspec.handlers.Util

public final class Util extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    writeShortest(org.opendaylight.yangtools.yang.common.Uint16 value, io.netty.buffer.ByteBuf buffer)
    Given an uint16, this method instead of writing the value in 2B field, compresses the value to lowest required byte field depending on the value.
    static void
    writeShortest(org.opendaylight.yangtools.yang.common.Uint32 value, io.netty.buffer.ByteBuf buffer)
    Given an uint32, this method instead of writing the value in 4B field, compresses the value to lowest required byte field depending on the value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • writeShortest

      public static void writeShortest(org.opendaylight.yangtools.yang.common.Uint16 value, io.netty.buffer.ByteBuf buffer)
      Given an uint16, this method instead of writing the value in 2B field, compresses the value to lowest required byte field depending on the value.
      Parameters:
      value - uint16 to be written
      buffer - ByteBuf where the value will be written
    • writeShortest

      public static void writeShortest(org.opendaylight.yangtools.yang.common.Uint32 value, io.netty.buffer.ByteBuf buffer)
      Given an uint32, this method instead of writing the value in 4B field, compresses the value to lowest required byte field depending on the value.
      Parameters:
      value - uint32 to be written
      buffer - ByteBuf where the value will be written