Code example for AssetFileDescriptor

Methods: createInputStream

    public InputStream createInputStream() throws IOException {
      // NB: Because createInputStream can only be called once per asset  
      // we always create a new file descriptor here. 
      return fd.createInputStream();
    public String getContentType() {
      // TODO: Support other media if we need to 
      return "audio/mp3"; 
    public long getContentLength() { 
      if( isSimulatingStream() ) { 
      if (fd == null) {
Connect your IDE to all the code out there  Get Codota for Java