I am trying to get input stream from something like this.
InputSource myInputSource = new InputSource(activity.getResources().openRawResource(com.MYCLass.R.x
You can read the file by the following code :
InputStream object = this.getResources() .openRawResource(R.rawFolderName.fileName);