public static List<Entry> loadEntriesFromAssets(AssetManager am,String path){
  List<Entry> entries=new ArrayList<Entry>();
  BufferedReader reader=null;
  try {
    reader=new BufferedReader(new InputStreamReader(am.open(path),"UTF-8"));
    String line=reader.readLine();
    while (line != 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])));
      }
      line=reader.readLine();
    }
  }
 catch (  IOException e) {
    Log.e(LOG,e.toString());
  }
 finally {
    if (reader != null) {
      try {
        reader.close();
      }
 catch (      IOException e) {
        Log.e(LOG,e.toString());
      }
    }
  }
  return entries;
}

public static List < Entry > loadEntriesFromAssets ( AssetManager am , String path ) { List < Entry > entries = new ArrayList < Entry > ( ) ; BufferedReader reader = null ; try { reader = new BufferedReader ( new InputStreamReader ( am . open ( path ) , "UTF-8" ) ) ; String line = reader . readLine ( ) ; while ( line != 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 ] ) ) ) ; } line = reader . readLine ( ) ; } } catch ( IOException e ) { Log . e ( LOG , e . toString ( ) ) ; } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( IOException e ) { Log . e ( LOG , e . toString ( ) ) ; } } } return entries ; }
loads an array of entries from a textfile from the assets folder .
