public static List < NetFlowV9Template > parseTemplates ( ByteBuf bb , NetFlowV9FieldTypeRegistry typeRegistry ) { final ImmutableList . Builder < NetFlowV9Template > templates = ImmutableList . builder ( ) ; int len = bb . readUnsignedShort ( ) ; int p = 4 ; // flow set id and length field itself while ( p < len ) { final NetFlowV9Template template = parseTemplate ( bb , typeRegistry ) ; templates . add ( template ) ; p += 4 + template . fieldCount ( ) * 4 ; } return templates . build ( ) ; }
Template FlowSet Format