public static boolean isValidFile ( RandomAccessFile raf ) { String fileName = raf . getLocation ( ) ; AreaFile af = null ; try { af = new AreaFile ( fileName ) ; // LOOK opening again not ok for isValidFile return true ; } catch ( AreaFileException e ) { return false ; // barfola } finally { if ( af != null ) af . close ( ) ; // LOOK need to look at this code } }
Check to see if this is a valid AREA file .