Class ParameterUtil


  • public final class ParameterUtil
    extends Object
    Utility class which is intended for formatting parameter.
    • 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 parameter
        value - parameter value
        buffer - ByteBuf where the parameter will be copied with its header
        Throws:
        IllegalArgumentException - if value length exceeds 255 bytes
        ParameterLengthOverflowException
      • 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 parameter
        value - parameter value
        buffer - ByteBuf where the parameter will be copied with its header
        Throws:
        IllegalArgumentException - if value length exceeds 65535 bytes