@Nullable
    public static String readTextFileFromRawResource(@NonNull final Context context,
                                                     @RawRes final int resId) {

        final BufferedReader bufferedReader = new BufferedReader(
                new InputStreamReader(context.getResources().openRawResource(resId))
        );

        String line;
        final StringBuilder body = new StringBuilder();

        try {
            while ((line = bufferedReader.readLine()) != null) {
                body.append(line).append('\n');
            }
        } catch (IOException e) {
            return null;
        }

        return body.toString();
    }
Reads a raw resource text file into a String
@param context
@param resId
@return
library/src/main/java/com/yalantis/starwars/utils/gl/RawResourceReader.java