Code example for FileNotFoundException

Methods: getMessage

0
			        FileDescriptor fd = fis.getFD();
					mp = new MediaPlayer();
					mp.setDataSource(fd);
					mp.prepare();
		        } catch(FileNotFoundException e) { 
		            System.out.println(e.getMessage());
		            return null; 
		        } catch(IOException e) { 
		            System.out.println(e.getMessage());
		            return null; 
		        } 
		    } else { 
				Uri uri = Uri.parse(inPath);
				mp = MediaPlayer.create(mContext, uri);
		    } 
		} else { 
			mp = MediaPlayer.create(mContext, resId);
		} 
 
		return mp;
	}