net-commonlib/src/main/java/com/streamsets/pipeline/lib/parser/net/netflow/NetflowCommonDecoder.java
public void decodeStandaloneBuffer(
      ByteBuf buf,
      List<BaseNetflowMessage> resultMessages,
      InetSocketAddress sender,
      InetSocketAddress recipient
  ) throws OnRecordErrorException {
    final List<Object> results = new LinkedList<>();
    try {
      decode(null, buf, results, sender, recipient, true);
      for (Object result : results) {
        if (result == null) {
          LOG.warn("null result found from decoding standalone Netflow buffer; skipping");
          continue;
        }
        if (result instanceof BaseNetflowMessage) {
          resultMessages.add((BaseNetflowMessage) result);
        } else {
          throw new IllegalStateException(String.format(
              "Found unexpected object type in results: %s",
              result.getClass().getName())
          );
        }
      }
    } finally {
      resetStateVariables();
    }
  }
public void decodeStandaloneBuffer(
      ByteBuf buf,
      List<BaseNetflowMessage> resultMessages,
      InetSocketAddress sender,
      InetSocketAddress recipient
  ) throws OnRecordErrorException {
    final List<Object> results = new LinkedList<>();
    try {
      decode(null, buf, results, sender, recipient, true);
      for (Object result : results) {
        if (result == null) {
          LOG.warn("null result found from decoding standalone Netflow buffer; skipping");
          continue;
        }
        if (result instanceof BaseNetflowMessage) {
          resultMessages.add((BaseNetflowMessage) result);
        } else {
          throw new IllegalStateException(String.format(
              "Found unexpected object type in results: %s",
              result.getClass().getName())
          );
        }
      }
    } finally {
      resetStateVariables();
    }
  }
Decodes one or more {@link NetflowV5Message} from a packet.  For this method, the data (ByteBuf) is assumed
to be complete (i.e. it will contain all the data), which is the case for UDP.

@param buf the byte buffer from the packet
@param resultMessages a list of messages to populate from the parsing operation
@param sender the packet sender address
@param recipient the packet recipient address
@throws OnRecordErrorException