Code example for AssetFileDescriptor

Methods: createInputStream

0
   * @param charset the text encoding to use 
   * @return the file contents 
   * @see http://developer.android.com/reference/android/content/res/AssetFileDescriptor.html 
   */ 
  public static String readTextFile(AssetFileDescriptor input, Charset charset) throws IOException {
    return readTextFile(input.createInputStream(), charset);
  } 
 
  /** 
   * Reads and returns the contents of the given plain-text asset file. 
   * 
   * The default text encoding assumed is UTF-8. 
   * 
   * @param input an already opened input file stream 
   * @return the file contents 
   * @see http://developer.android.com/reference/java/io/FileInputStream.html 
   */ 
  public static String readTextFile(FileInputStream input) throws IOException {
    return readTextFile(input, UTF_8);
  } 
Connect your IDE to all the code out there  Get Codota for Java