+ private static void serializeRouteTags(final List<RouteTag> routeTags, final ByteBuf byteAggregator) {
+ if (routeTags != null) {
+ final ByteBuf routeTagsBuf = Unpooled.buffer();
+ for (final RouteTag routeTag : routeTags) {
+ routeTagsBuf.writeBytes(routeTag.getValue());
+ }
+ TlvUtil.writeTLV(ROUTE_TAG, routeTagsBuf, byteAggregator);
+ }
+ }
+
+ private static void serializeExtendedRouteTags(final List<ExtendedRouteTag> exRouteTags, final ByteBuf byteAggregator) {
+ if (exRouteTags != null) {
+ final ByteBuf extendedBuf = Unpooled.buffer();
+ for (final ExtendedRouteTag exRouteTag : exRouteTags) {
+ extendedBuf.writeBytes(exRouteTag.getValue());
+ }
+ TlvUtil.writeTLV(EXTENDED_ROUTE_TAG, extendedBuf, byteAggregator);
+ }
+ }
+