I'm trying to read large `base64` Text File with size `(~ 150MB)` on android application.

The file contains JSON string that i need to decode and transform it to an JSON object, and use it along the app. The problem is that I'm getting an exception `Out of Memory` while trying to read this data.

The app needs to work offline so I need to download the full data.

Here's the code:

```
    String localPath = getApplicationContext().getFilesDir().getPath().toString() ;
    String key = "dataFile.txt" ;

    StringBuilder text = new StringBuilder();
    File file=new File(localPath+"/"+ key);

    byte fileContent[] = new byte[3000];

    try ( FileInputStream fin = new FileInputStream(file)) {
        while(fin.read(fileContent) >= 0) {
            byte[] data = Base64.decode(fileContent, Base64.DEFAULT);
            try {
                text.append(new String(data, "UTF-8"));
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }
        }
        obj = new JSONObject(text.toString());
    }catch (Exception e){
        e.printStackTrace();
    }

```

How can i read this kind of file?