mReferences.put(name, object);
mReferences.setKeyValues(references);
mReferences.putAll(refs);
InputStream inputStream = context.getResources().openRawResource(resourceId); InputStreamReader reader = new InputStreamReader(inputStream); StringWriter writer = new StringWriter(); char[] buffer = new char[1024]; try { int bytesRead; while ((bytesRead = reader.read(buffer, 0, 1024)) > 0) { writer.write(buffer, 0, bytesRead); } } catch (IOException e) { throw new RuntimeException("Could not read specified resource file!"); } return readGraphString(writer.toString());