title: Android load local xml file
body: <p>I'm working with Eclipse. Does anybody know where this piece of code tries to get the file from?
  I've copied my files to the project folder and also the srr/package_path folder.</p>
  
  <pre class="lang-java prettyprint-override"><code>public String getFromFile(ASerializer aserializer) {
      String data = new String();
      try {
      FileInputStream stream = new FileInputStream(new File(aserializer.toLocalResource()));
         FileChannel fc = stream.getChannel();
          MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
          /* Instead of using default, pass in a decoder. */
          data  = Charset.defaultCharset().decode(bb).toString();
          stream.close();
      }
      catch (Exception e){
          data = "File not found";
      }
      return data;
  }
  </code></pre>