public static List<Entry> loadEntriesFromFile(String path){
  File sdcard=Environment.getExternalStorageDirectory();
  File file=new File(sdcard,path);
  List<Entry> entries=new ArrayList<Entry>();
  try {
    @SuppressWarnings("resource") BufferedReader br=new BufferedReader(new FileReader(file));
    String line;
    while ((line=br.readLine()) != null) {
      String[] split=line.split("#");
      if (split.length <= 2) {
        entries.add(new Entry(Float.parseFloat(split[0]),Integer.parseInt(split[1])));
      }
 else {
        float[] vals=new float[split.length - 1];
        for (int i=0; i < vals.length; i++) {
          vals[i]=Float.parseFloat(split[i]);
        }
        entries.add(new BarEntry(vals,Integer.parseInt(split[split.length - 1])));
      }
    }
  }
 catch (  IOException e) {
    Log.e(LOG,e.toString());
  }
  return entries;
}

public static List < Entry > loadEntriesFromFile ( String path ) { File sdcard = Environment . getExternalStorageDirectory ( ) ; File file = new File ( sdcard , path ) ; List < Entry > entries = new ArrayList < Entry > ( ) ; try { @ SuppressWarnings ( "resource" ) BufferedReader br = new BufferedReader ( new FileReader ( file ) ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { String [ ] split = line . split ( "#" ) ; if ( split . length <= 2 ) { entries . add ( new Entry ( Float . parseFloat ( split [ 0 ] ) , Integer . parseInt ( split [ 1 ] ) ) ) ; } else { float [ ] vals = new float [ split . length - 1 ] ; for ( int i = 0 ; i < vals . length ; i ++ ) { vals [ i ] = Float . parseFloat ( split [ i ] ) ; } entries . add ( new BarEntry ( vals , Integer . parseInt ( split [ split . length - 1 ] ) ) ) ; } } } catch ( IOException e ) { Log . e ( LOG , e . toString ( ) ) ; } return entries ; }
loads a an array of entries from a textfile from the sd - card .
