class ConfigStorageClient {

  @Nullable
  public synchronized ConfigContainer read() throws IOException {

    FileInputStream fileInputStream = null;
    try {
      fileInputStream = context.openFileInput(fileName);
      byte[] bytes = new byte[fileInputStream.available()];
      fileInputStream.read(bytes, 0, bytes.length);
      String containerJsonString = new String(bytes, JSON_STRING_ENCODING);

      JSONObject containerJson = new JSONObject(containerJsonString);
      return ConfigContainer.copyOf(containerJson);
    } catch (JSONException | FileNotFoundException e) {
      // File might not have been written to yet, so this not an irrecoverable error.
      return null;
    } finally {
      if (fileInputStream != null) fileInputStream.close();
    }
  }

  private  ConfigStorageClient(Context context, String fileName);

}