@Override
    public void read(JmeImporter im) throws IOException {
        InputCapsule in = im.getCapsule(this);
        name = in.readString("name", null);
        length = in.readFloat("length", 0f);

        Savable[] arr = in.readSavableArray("tracks", null);
        if (arr != null) {
            // NOTE: Backward compatibility only. Some animations have no
            // tracks set at all, even though it makes no sense.
            // Since there's a null check in setTime(),
            // it's only appropriate that the check is made here as well.
            tracks = new SafeArrayList<>(Track.class);
            for (Savable savable : arr) {
                tracks.add((Track) savable);
            }
        }
    }
@param spat the Spatial to clone for
@return a new instance
jme3-core/src/main/java/com/jme3/animation/Animation.java