public void record(RecordBuilderImpl recordBuilder){
  storeBitmap(recordBuilder);
  OutputStream viewHierarchyDump=null;
  try {
    viewHierarchyDump=mAlbum.openViewHierarchyFile(recordBuilder.getName());
    mViewHierarchy.deflate(recordBuilder.getView(),viewHierarchyDump);
    mAlbum.addRecord(recordBuilder);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
 finally {
    if (viewHierarchyDump != null) {
      try {
        viewHierarchyDump.close();
      }
 catch (      IOException e) {
        Log.e("ScreenshotImpl","Exception closing viewHierarchyDump",e);
      }
    }
  }
}

public void record ( RecordBuilderImpl recordBuilder ) { storeBitmap ( recordBuilder ) ; OutputStream viewHierarchyDump = null ; try { viewHierarchyDump = mAlbum . openViewHierarchyFile ( recordBuilder . getName ( ) ) ; mViewHierarchy . deflate ( recordBuilder . getView ( ) , viewHierarchyDump ) ; mAlbum . addRecord ( recordBuilder ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } finally { if ( viewHierarchyDump != null ) { try { viewHierarchyDump . close ( ) ; } catch ( IOException e ) { Log . e ( "ScreenshotImpl" , "Exception closing viewHierarchyDump" , e ) ; } } } }
records the recordbuilderimpl , and verifies if required
