Class ParameterUtil
- java.lang.Object
-
- org.opendaylight.protocol.bgp.parser.spi.ParameterUtil
-
public final class ParameterUtil extends Object
Utility class which is intended for formatting parameter.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
formatExtendedParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer)
Adds header to parameter value in draft-ietf-idr-ext-opt-param-05 format.static void
formatParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer)
Adds header to parameter value in RFC4271 format.
-
-
-
Method Detail
-
formatParameter
public static void formatParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer) throws ParameterLengthOverflowException
Adds header to parameter value in RFC4271 format.- Parameters:
type
- of the parametervalue
- parameter valuebuffer
- ByteBuf where the parameter will be copied with its header- Throws:
IllegalArgumentException
- if value length exceeds 255 bytesParameterLengthOverflowException
-
formatExtendedParameter
public static void formatExtendedParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer)
Adds header to parameter value in draft-ietf-idr-ext-opt-param-05 format.- Parameters:
type
- of the parametervalue
- parameter valuebuffer
- ByteBuf where the parameter will be copied with its header- Throws:
IllegalArgumentException
- if value length exceeds 65535 bytes
-
-