package org.hisp.dhis.android.core.data.file;

import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public final class ResourcesFileReader implements IFileReader {
    @Override
    public String getStringFromFile(String filename) throws IOException {
        InputStream fileStream = this.getClass().getClassLoader().getResourceAsStream(filename);
        Scanner scanner = new java.util.Scanner(fileStream).useDelimiter("\\A");
        return scanner.hasNext() ? scanner.next() : "";
    }
}


package org.hisp.dhis.android.core.data.file;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

public final class ResourcesFileReader implements IFileReader {
    @Override
    public String getStringFromFile(String filename) throws IOException {
        InputStream fileStream = this.getClass().getClassLoader().getResourceAsStream(filename);

        StringBuilder textBuilder = new StringBuilder();
        try (Reader reader = new BufferedReader(new InputStreamReader
                (fileStream, Charset.forName(StandardCharsets.UTF_8.name())))) {
            int c;
            while ((c = reader.read()) != -1) {
                textBuilder.append((char) c);
            }
        }

        return textBuilder.toString();
    }
}


Change ResourcesFileReader implementation