Ejemplo n.º 1
0
 // If master list does exist then read the master list CSV file back in and print it out
 public List<ParsedPointOfInterest> loadCSVFile(String fileName) {
   List<ParsedPointOfInterest> myList = new ArrayList<ParsedPointOfInterest>();
   FileInputStream input;
   try {
     input = openFileInput(fileName);
     InputStreamReader reader = new InputStreamReader(input);
     CSVReader csvReader = new CSVReader(reader);
     String columns[];
     while ((columns = csvReader.readNext()) != null) {
       ParsedPointOfInterest poi = ParsedPointOfInterest.create(columns);
       myList.add(poi);
     }
     csvReader.close();
     reader.close();
   } catch (IOException e) {
     e.printStackTrace();
   }
   return myList;
 }
Ejemplo n.º 2
0
 // If master list does not exist then parse and load original template
 public List<ParsedPointOfInterest> loadTemplateFile(String fileName) {
   List<ParsedPointOfInterest> myList = new ArrayList<ParsedPointOfInterest>();
   InputStream assetStream;
   try {
     assetStream = getAssets().open(fileName);
     InputStreamReader reader = new InputStreamReader(assetStream);
     CSVReader csvReader = new CSVReader(reader);
     String columns[];
     while ((columns = csvReader.readNext()) != null) {
       ParsedPointOfInterest poi = ParsedPointOfInterest.create(columns);
       myList.add(poi); // LOOK INTO THIS!!!!!!!!
     }
     csvReader.close();
     reader.close();
   } catch (IOException e) {
     e.printStackTrace();
   }
   return myList;
 }