public static void updateBufferData(List<StructField<?>> fields, boolean forceUpdate, BufferLayout layout, BufferObject out) {
        boolean updateNeeded = false;
        for (StructField<?> f : fields) {
            if (forceUpdate || f.isUpdateNeeded()) {

                BufferRegion region = out.getRegion(f.getPosition());
                if (logger.isLoggable(java.util.logging.Level.FINER)) {
                    logger.log(java.util.logging.Level.FINER, "Serialize {0} in {1} ", new Object[] { f, region });
                }
                layout.write(region.getData(), f.getValue());
                region.markDirty();
                f.clearUpdateNeeded();
                updateNeeded = true;
            } else {
                if (logger.isLoggable(java.util.logging.Level.FINER)) {
                    logger.log(java.util.logging.Level.FINER, "Already up to date. Skip {0}  ", new Object[] { f });
                }
            }
        }
        if (updateNeeded) out.setUpdateNeeded(false);
    }
Update data using a List of StructFields The current layout will be
maintained unless previously invalidated

@param fields
           sorted list of struct fields
jme3-core/src/main/java/com/jme3/util/struct/StructUtils.java