@@ -0,0 +1,968 @@
+package com.roryhool.videoinfoviewer.utils;%0A%0Aimport android.util.SparseArray;%0A%0Aimport com.coremedia.iso.IsoFile;%0Aimport com.coremedia.iso.boxes.Box;%0A%0Apublic class IsoFileCache %7B%0A%0A   private static IsoFileCache sInstance = null;%0A%0A   public static IsoFileCache Instance() %7B%0A      if ( sInstance == null ) %7B%0A         sInstance = new IsoFileCache();%0A      %7D%0A%0A      return sInstance;%0A   %7D%0A%0A   private SparseArray%3CIsoFile%3E mIsoFiles = new SparseArray%3CIsoFile%3E();%0A%0A   private SparseArray%3CBox%3E mBoxes = new SparseArray%3CBox%3E();%0A%0A   public int cacheIsoFile( IsoFile isoFile ) %7B%0A      int index = mIsoFiles.size();%0A      mIsoFiles.put( index, isoFile );%0A      return index;%0A   %7D%0A%0A   public int cacheBox( Box box ) %7B%0A      int index = mBoxes.size();%0A      mBoxes.put( index, box );%0A      return index;%0A   %7D%0A%0A   public IsoFile getIsoFile( int isoFileId ) %7B%0A      return mIsoFiles.get( isoFileId );%0A   %7D%0A%0A   public Box getBox( int boxId ) %7B%0A      return mBoxes.get( boxId );%0A   %7D%0A%7D%0A

Add IsoFileCache so we can cache IsoFile and box objects in memory so we don't have to recreate them