Class Util
java.lang.Object
org.opendaylight.protocol.bgp.flowspec.handlers.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 writtenbuffer
- 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 writtenbuffer
- ByteBuf where the value will be written
-