public static SecuritySpecModel deserializeSpecFromFile(String androidProjectRootPath){
  SecuritySpecModel spec=null;
  String fileName=androidProjectRootPath + File.separator + Project.OUTPUT_DIR+ File.separator+ SECURITY_SPEC_SERIAL_FILE_NAME;
  File file=new File(fileName);
  if (file.exists()) {
    try {
      ObjectInputStream ois=new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));
      try {
        Object obj=ois.readObject();
        if (obj instanceof SecuritySpecModel) {
          spec=(SecuritySpecModel)obj;
        }
      }
  finally {
        ois.close();
      }
    }
 catch (    Exception ex) {
      ex.printStackTrace();
    }
  }
  return spec;
}

public static SecuritySpecModel deserializeSpecFromFile ( String androidProjectRootPath ) { SecuritySpecModel spec = null ; String fileName = androidProjectRootPath + File . separator + Project . OUTPUT_DIR + File . separator + SECURITY_SPEC_SERIAL_FILE_NAME ; File file = new File ( fileName ) ; if ( file . exists ( ) ) { try { ObjectInputStream ois = new ObjectInputStream ( new BufferedInputStream ( new FileInputStream ( file ) ) ) ; try { Object obj = ois . readObject ( ) ; if ( obj instanceof SecuritySpecModel ) { spec = ( SecuritySpecModel ) obj ; } } finally { ois . close ( ) ; } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } return spec ; }
reads the serialized version of the security specification from a file and creates a spec model .
