コード例 #1
0
ファイル: CacheManager.java プロジェクト: jmsloat/RedReader
    public ReadableCacheFile getReadableCacheFile() throws IOException {

      if (readableCacheFile == null) {

        if (!request.isJson) {
          BugReportActivity.handleGlobalError(context, "Attempt to read cache file before closing");
        }

        try {
          os.flush();
          os.close();
        } catch (IOException e) {
          Log.e("RR DEBUG getReadableCacheFile", "Error closing " + cacheFileId);
          throw e;
        }
      }

      return readableCacheFile;
    }