code: public void cacheFile() {
  		if (orientation == Orientation.INV)
  			cache = new String[fields][elements];
  		else
  			cache = new String[elements][fields];
  		int x = 0, y = 0;
  		Scanner file = null;
  		try {
  			file = new Scanner(csvFile);
  		} catch (FileNotFoundException e) {
  			// TODO Auto-generated catch block
  			e.printStackTrace();
  		}
  		String line;
  		StringTokenizer tokenizer;
  		while(file.hasNextLine()){
  			line = file.nextLine();
  			tokenizer = new StringTokenizer(line, ",");
  			while(tokenizer.hasMoreTokens()){
  				cache[y][x] = tokenizer.nextToken();
  				x++;
  			}
  			x = 0;
  			y++;
  			
  		}
  		file.close();
  		cached = true;
  	}
docs: load the entire CSV file into memory for much faster access
  subsequent use of getField will not use file access and will occur in constant time