Class IpAddressUtil

java.lang.Object
org.opendaylight.bgp.concepts.IpAddressUtil

public final class IpAddressUtil extends Object
Utility class for IpAddress models type(like Originator Route Ip) serialization and parsing.
Author:
Claudio D. Gasparini
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone
    addressForByteBuf(io.netty.buffer.ByteBuf buffer)
    Returns IpAddress from byte array containing ipAddress lenght + ipAddress.
    static @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone
    addressForByteBufWOLength(io.netty.buffer.ByteBuf buffer)
    Returns IpAddress from byte array containing ipAddress based on ByteArray length.
    static @NonNull io.netty.buffer.ByteBuf
    bytesFor(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone address)
    Returns byte array containing IpAddress length and IpAddress.
    static @NonNull io.netty.buffer.ByteBuf
    bytesWOLengthFor(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone address)
    Returns byte array containing IpAddress.
    static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone
    extractIpAddress(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier rdNid)
     

    Methods inherited from class java.lang.Object

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

    • addressForByteBuf

      public static @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone addressForByteBuf(io.netty.buffer.ByteBuf buffer)
      Returns IpAddress from byte array containing ipAddress lenght + ipAddress.
      Parameters:
      buffer - containing ip address
      Returns:
      IpAddressNoZone
    • addressForByteBufWOLength

      public static @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone addressForByteBufWOLength(io.netty.buffer.ByteBuf buffer)
      Returns IpAddress from byte array containing ipAddress based on ByteArray length.
      Parameters:
      buffer - containing ip address
      Returns:
      IpAddressNoZone
    • bytesFor

      public static @NonNull io.netty.buffer.ByteBuf bytesFor(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone address)
      Returns byte array containing IpAddress length and IpAddress.
      Parameters:
      address - containing ipv4 or ipv6 address
      Returns:
      byte array
    • bytesWOLengthFor

      public static @NonNull io.netty.buffer.ByteBuf bytesWOLengthFor(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone address)
      Returns byte array containing IpAddress.
      Parameters:
      address - containing ipv4 or ipv6 address
      Returns:
      byte array
    • extractIpAddress

      public static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone extractIpAddress(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier rdNid)