First off, i think I should say that if you're trying to access your resources like this, you're probably going about this the wrong way. The R class should not generally be used in this way.
However, if you really need to do what you're trying to do, you could use reflection. Note: This is not recommended as it uses a lot of overhead and will slow down you're application if used often.
Here's a code sample:
try
{
int itemId = R.raw.class.getField(name).getInt(null);
InputStream is = getResources().openRawResource(itemId);
InputStreamReader isreader = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isreader);
}
catch (NoSuchFieldException ex)
{
// Handle
}
catch (IllegalAccessException ex)
{
// Handle
}
Hope this helps :)