Java 类com.android.volley.Cache.Entry 实例源码

项目:boohee_v5.6    文件:DiskBasedCache.java   
public synchronized void put(String key, Entry entry) {
    pruneIfNeeded(entry.data.length);
    File file = getFileForKey(key);
    try {
        BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(file));
        CacheHeader e = new CacheHeader(key, entry);
        if (e.writeHeader(fos)) {
            fos.write(entry.data);
            fos.close();
            putEntry(key, e);
        } else {
            fos.close();
            VolleyLog.d("Failed to write header for %s", file.getAbsolutePath());
            throw new IOException();
        }
    } catch (IOException e2) {
        if (!file.delete()) {
            VolleyLog.d("Could not clean up file %s", file.getAbsolutePath());
        }
    }
}
项目:joy-library    文件:ObjectRequest.java   
@Override
public Response<T> parseNetworkResponse(NetworkResponse response) {

    String parsed;
    try {

        String charsetName = HttpHeaderParser.parseCharset(response.headers);
        parsed = new String(response.data, charsetName);
    } catch (UnsupportedEncodingException e) {

        parsed = new String(response.data);
        e.printStackTrace();
    }

    QyerResponse<T> resp = onResponse(parsed);
    if (resp.isSuccess()) {

        Entry entry = HttpHeaderParser.parseCacheHeaders(response);
        mObjResp = Response.success(resp.getData(), entry);
        return mObjResp;
    } else {

        return Response.error(new VolleyError(resp.getMsg()));
    }
}
项目:SaveVolley    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        // 设置 If-None-Match
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        // 设置 If-Modified-Since
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:FMTech    文件:DiskBasedCache.java   
public final void invalidate(String paramString, boolean paramBoolean)
{
  try
  {
    Cache.Entry localEntry = get(paramString);
    if (localEntry != null)
    {
      localEntry.softTtl = 0L;
      if (paramBoolean) {
        localEntry.ttl = 0L;
      }
      put(paramString, localEntry);
    }
    return;
  }
  finally {}
}
项目:FMTech    文件:DfeRequest.java   
private void stripForCache(Response.ResponseWrapper paramResponseWrapper, Cache.Entry paramEntry)
{
  if ((paramResponseWrapper.preFetch.length <= 0) && (paramResponseWrapper.commands == null) && (paramResponseWrapper.notification.length <= 0) && (paramResponseWrapper.serverCookies == null)) {
    return;
  }
  Cache localCache = this.mApiContext.mCache;
  long l = System.currentTimeMillis();
  for (PreFetch localPreFetch : paramResponseWrapper.preFetch)
  {
    Cache.Entry localEntry = new Cache.Entry();
    localEntry.data = localPreFetch.response;
    localEntry.etag = localPreFetch.etag;
    localEntry.serverDate = paramEntry.serverDate;
    localEntry.ttl = (l + localPreFetch.ttl);
    localEntry.softTtl = (l + localPreFetch.softTtl);
    localCache.put(makeCacheKey(Uri.withAppendedPath(DfeApi.BASE_URI, localPreFetch.url).toString()), localEntry);
  }
  paramResponseWrapper.preFetch = PreFetch.emptyArray();
  paramResponseWrapper.commands = null;
  paramResponseWrapper.notification = Notification.emptyArray();
  paramResponseWrapper.serverCookies = null;
  paramEntry.data = MessageNano.toByteArray(paramResponseWrapper);
}
项目:FMTech    文件:AddressMetadataCacheManager.java   
public final String get(String paramString)
{
  Cache.Entry localEntry = this.mCache.get("AddressMetadataCacheManager-" + paramString);
  if ((localEntry == null) || (localEntry.isExpired())) {
    return "";
  }
  try
  {
    String str = new String(localEntry.data, "UTF-8");
    return str;
  }
  catch (UnsupportedEncodingException localUnsupportedEncodingException)
  {
    throw new RuntimeException("UTF-8 not supported.");
  }
}
项目:FMTech    文件:AddressMetadataCacheManager.java   
public final void put(String paramString1, String paramString2)
{
  Cache.Entry localEntry = new Cache.Entry();
  try
  {
    localEntry.data = paramString2.getBytes("UTF-8");
    localEntry.serverDate = System.currentTimeMillis();
    localEntry.ttl = (604800000L + localEntry.serverDate);
    this.mCache.put("AddressMetadataCacheManager-" + paramString1, localEntry);
    return;
  }
  catch (UnsupportedEncodingException localUnsupportedEncodingException)
  {
    throw new RuntimeException("UTF-8 not supported.");
  }
}
项目:FMTech    文件:InstantPurchaseUtils.java   
public static Document getDocument(PurchaseParams paramPurchaseParams, Cache paramCache)
{
  if (paramPurchaseParams.document != null) {
    return paramPurchaseParams.document;
  }
  Cache.Entry localEntry = paramCache.get("InstantPurchaseDocument-" + paramPurchaseParams.docidStr);
  if ((localEntry == null) || (localEntry.isExpired())) {
    return null;
  }
  try
  {
    byte[] arrayOfByte = localEntry.data;
    Document localDocument = new Document((DocV2)MessageNano.mergeFrom$1ec43da(new DocV2(), arrayOfByte, arrayOfByte.length));
    return localDocument;
  }
  catch (InvalidProtocolBufferNanoException localInvalidProtocolBufferNanoException)
  {
    throw new RuntimeException(localInvalidProtocolBufferNanoException);
  }
}
项目:FMTech    文件:DfeRequest.java   
private void stripForCache(PlayResponse.PlayResponseWrapper paramPlayResponseWrapper, Cache.Entry paramEntry)
{
  if ((paramPlayResponseWrapper.preFetch.length <= 0) && (paramPlayResponseWrapper.commands == null)) {
    return;
  }
  Cache localCache = this.mApiContext.mCache;
  long l = System.currentTimeMillis();
  for (PreFetch localPreFetch : paramPlayResponseWrapper.preFetch)
  {
    Cache.Entry localEntry = new Cache.Entry();
    localEntry.data = localPreFetch.response;
    localEntry.etag = localPreFetch.etag;
    localEntry.serverDate = paramEntry.serverDate;
    localEntry.ttl = (l + localPreFetch.ttl);
    localEntry.softTtl = (l + localPreFetch.softTtl);
    localCache.put(makeCacheKey(Uri.withAppendedPath(PlayDfeApi.BASE_URI, localPreFetch.url).toString()), localEntry);
  }
  paramPlayResponseWrapper.preFetch = PreFetch.emptyArray();
  paramPlayResponseWrapper.commands = null;
  paramEntry.data = MessageNano.toByteArray(paramPlayResponseWrapper);
}
项目:FMTech    文件:SecureRequest.java   
protected final Response<Pair<RequestT, ResponseT>> parseNetworkResponse(NetworkResponse paramNetworkResponse)
{
  try
  {
    Class localClass = this.mResponseClass;
    MessageNano localMessageNano1 = (MessageNano)this.mResponseClass.newInstance();
    byte[] arrayOfByte = paramNetworkResponse.data;
    MessageNano localMessageNano2 = (MessageNano)localClass.cast(MessageNano.mergeFrom$1ec43da(localMessageNano1, arrayOfByte, arrayOfByte.length));
    ProtoUtils.logResponse(localMessageNano2, getUrl());
    Cache.Entry localEntry = HttpHeaderParser.parseCacheHeaders(paramNetworkResponse);
    return Response.success(Pair.create(this, localMessageNano2), localEntry);
  }
  catch (InstantiationException localInstantiationException)
  {
    throw new RuntimeException("Failed to instantiate proto object.", localInstantiationException);
  }
  catch (IllegalAccessException localIllegalAccessException)
  {
    throw new RuntimeException("Failed to access proto constructor.", localIllegalAccessException);
  }
  catch (IOException localIOException)
  {
    Log.e("SecureRequest", "Couldn't parse proto response for url=" + getUrl());
  }
  return Response.error(new ParseError(paramNetworkResponse));
}
项目:AndroidLife    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        // 设置 If-None-Match
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        // 设置 If-Modified-Since
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:Qmusic    文件:QmusicRequest.java   
@Override
public byte[] getBody() throws AuthFailureError {
    try {
        if (params != null) {
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            for (Map.Entry<String, String> e : params.entrySet()) {
                String key = e.getKey();
                String value = e.getValue();
                if (value != null) {
                    pairs.add(new BasicNameValuePair(key, value));
                }
            }
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            HttpEntity entity = new UrlEncodedFormEntity(pairs, PROTOCOL_CHARSET);
            entity.writeTo(bos);
            return bos.toByteArray();
        }
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return null;
}
项目:GitHub    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:GitHub    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:publicProject    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:Codeforces    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:GeekZone    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:boohee_v5.6    文件:DiskBasedCache.java   
public CacheHeader(String key, Entry entry) {
    this.key = key;
    this.size = (long) entry.data.length;
    this.etag = entry.etag;
    this.serverDate = entry.serverDate;
    this.lastModified = entry.lastModified;
    this.ttl = entry.ttl;
    this.softTtl = entry.softTtl;
    this.responseHeaders = entry.responseHeaders;
}
项目:boohee_v5.6    文件:DiskBasedCache.java   
public Entry toCacheEntry(byte[] data) {
    Entry e = new Entry();
    e.data = data;
    e.etag = this.etag;
    e.serverDate = this.serverDate;
    e.lastModified = this.lastModified;
    e.ttl = this.ttl;
    e.softTtl = this.softTtl;
    e.responseHeaders = this.responseHeaders;
    return e;
}
项目:boohee_v5.6    文件:DiskBasedCache.java   
public synchronized void invalidate(String key, boolean fullExpire) {
    Entry entry = get(key);
    if (entry != null) {
        entry.softTtl = 0;
        if (fullExpire) {
            entry.ttl = 0;
        }
        put(key, entry);
    }
}
项目:boohee_v5.6    文件:DiskBasedCache.java   
private void pruneIfNeeded(int neededSpace) {
    if (this.mTotalSize + ((long) neededSpace) >= ((long) this.mMaxCacheSizeInBytes)) {
        if (VolleyLog.DEBUG) {
            VolleyLog.v("Pruning old cache entries.", new Object[0]);
        }
        long before = this.mTotalSize;
        int prunedFiles = 0;
        long startTime = SystemClock.elapsedRealtime();
        Iterator<Map.Entry<String, CacheHeader>> iterator = this.mEntries.entrySet().iterator();
        while (iterator.hasNext()) {
            CacheHeader e = (CacheHeader) ((Map.Entry) iterator.next()).getValue();
            if (getFileForKey(e.key).delete()) {
                this.mTotalSize -= e.size;
            } else {
                VolleyLog.d("Could not delete cache entry for key=%s, filename=%s", e.key, getFilenameForKey(e.key));
            }
            iterator.remove();
            prunedFiles++;
            if (((float) (this.mTotalSize + ((long) neededSpace))) < ((float) this.mMaxCacheSizeInBytes) * HYSTERESIS_FACTOR) {
                break;
            }
        }
        if (VolleyLog.DEBUG) {
            VolleyLog.v("pruned %d files, %d bytes, %d ms", Integer.valueOf(prunedFiles), Long.valueOf(this.mTotalSize - before), Long.valueOf(SystemClock.elapsedRealtime() - startTime));
        }
    }
}
项目:boohee_v5.6    文件:DiskBasedCache.java   
static void writeStringStringMap(Map<String, String> map, OutputStream os) throws IOException {
    if (map != null) {
        writeInt(os, map.size());
        for (Map.Entry<String, String> entry : map.entrySet()) {
            writeString(os, (String) entry.getKey());
            writeString(os, (String) entry.getValue());
        }
        return;
    }
    writeInt(os, 0);
}
项目:boohee_v5.6    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Entry entry) {
    if (entry != null) {
        if (entry.etag != null) {
            headers.put("If-None-Match", entry.etag);
        }
        if (entry.lastModified > 0) {
            headers.put("If-Modified-Since", DateUtils.formatDate(new Date(entry.lastModified)));
        }
    }
}
项目:boohee_v5.6    文件:Request.java   
private byte[] encodeParameters(Map<String, String> params, String paramsEncoding) {
    StringBuilder encodedParams = new StringBuilder();
    try {
        for (Map.Entry<String, String> entry : params.entrySet()) {
            encodedParams.append(URLEncoder.encode((String) entry.getKey(), paramsEncoding));
            encodedParams.append('=');
            encodedParams.append(URLEncoder.encode((String) entry.getValue(), paramsEncoding));
            encodedParams.append('&');
        }
        return encodedParams.toString().getBytes(paramsEncoding);
    } catch (UnsupportedEncodingException uee) {
        throw new RuntimeException("Encoding not supported: " + paramsEncoding, uee);
    }
}
项目:VoV    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:volley    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:MeifuGO    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:InfoQ-Android-App    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:volley-public-key-pinning    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:device-database    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:ShoppingApp    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:Simplified-Zhihu-Daily    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:SimplifyReader2    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:TastySnake    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:AyoSunny    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", InternalUtils.formatDate(refTime));
    }
}
项目:Jacket-    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.lastModified > 0) {
        Date refTime = new Date(entry.lastModified);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:ots15-companion    文件:BasicNetwork.java   
private void addCacheHeaders(Map<String, String> headers, Cache.Entry entry) {
    // If there's no cache entry, we're done.
    if (entry == null) {
        return;
    }

    if (entry.etag != null) {
        headers.put("If-None-Match", entry.etag);
    }

    if (entry.serverDate > 0) {
        Date refTime = new Date(entry.serverDate);
        headers.put("If-Modified-Since", DateUtils.formatDate(refTime));
    }
}
项目:FMTech    文件:DiskBasedCache.java   
public CacheHeader(String paramString, Cache.Entry paramEntry)
{
  this.key = paramString;
  this.size = paramEntry.data.length;
  this.etag = paramEntry.etag;
  this.serverDate = paramEntry.serverDate;
  this.lastModified = paramEntry.lastModified;
  this.ttl = paramEntry.ttl;
  this.softTtl = paramEntry.softTtl;
  this.responseHeaders = paramEntry.responseHeaders;
}
项目:FMTech    文件:DfeRequest.java   
private static Cache.Entry parseCacheHeaders(NetworkResponse paramNetworkResponse)
{
  localEntry = HttpHeaderParser.parseCacheHeaders(paramNetworkResponse);
  if (localEntry == null) {
    return null;
  }
  long l = System.currentTimeMillis();
  try
  {
    String str1 = (String)paramNetworkResponse.headers.get("X-DFE-Soft-TTL");
    if (str1 != null) {
      localEntry.softTtl = (l + Long.parseLong(str1));
    }
    String str2 = (String)paramNetworkResponse.headers.get("X-DFE-Hard-TTL");
    if (str2 != null) {
      localEntry.ttl = (l + Long.parseLong(str2));
    }
  }
  catch (NumberFormatException localNumberFormatException)
  {
    for (;;)
    {
      Object[] arrayOfObject = new Object[1];
      arrayOfObject[0] = paramNetworkResponse.headers;
      FinskyLog.d("Invalid TTL: %s", arrayOfObject);
      localEntry.softTtl = 0L;
      localEntry.ttl = 0L;
    }
  }
  localEntry.ttl = Math.max(localEntry.ttl, localEntry.softTtl);
  return localEntry;
}
项目:FMTech    文件:DfeRequest.java   
private static Cache.Entry parseCacheHeaders(NetworkResponse paramNetworkResponse)
{
  localEntry = HttpHeaderParser.parseCacheHeaders(paramNetworkResponse);
  if (localEntry == null) {
    return null;
  }
  long l = System.currentTimeMillis();
  try
  {
    String str1 = (String)paramNetworkResponse.headers.get("X-DFE-Soft-TTL");
    if (str1 != null) {
      localEntry.softTtl = (l + Long.parseLong(str1));
    }
    String str2 = (String)paramNetworkResponse.headers.get("X-DFE-Hard-TTL");
    if (str2 != null) {
      localEntry.ttl = (l + Long.parseLong(str2));
    }
  }
  catch (NumberFormatException localNumberFormatException)
  {
    for (;;)
    {
      Object[] arrayOfObject = new Object[1];
      arrayOfObject[0] = paramNetworkResponse.headers;
      PlayCommonLog.d("Invalid TTL: %s", arrayOfObject);
      localEntry.softTtl = 0L;
      localEntry.ttl = 0L;
    }
  }
  localEntry.ttl = Math.max(localEntry.ttl, localEntry.softTtl);
  return localEntry;
}