Constructs a CacheLoader for use when loading content from the cache.paramloadListener LoadListener to pass the content toparamresult CacheResult used as the source for the content. super(loadListener); mCacheResult = result;
super(loadListener); mCacheResult = result;
StringBuilder sb = new StringBuilder(mCacheResult.mimeType); if (mCacheResult.encoding != null && mCacheResult.encoding.length() > 0) { sb.append(';"); sb.append(mCacheResult.encoding); } headers.setContentType(sb.toString()); if (mCacheResult.location != null && mCacheResult.location.length() > 0) { headers.setLocation(mCacheResult.location); }
mDataStream = mCacheResult.inStream; mContentLength = mCacheResult.contentLength; mHandler.status(1, 1, mCacheResult.httpStatusCode, "OK"); return true;