java.net.HttpURLConnection.getIfModifiedSince()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中java.net.HttpURLConnection.getIfModifiedSince()方法的一些代码示例,展示了HttpURLConnection.getIfModifiedSince()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpURLConnection.getIfModifiedSince()方法的具体详情如下:
包路径:java.net.HttpURLConnection
类名称:HttpURLConnection
方法名:getIfModifiedSince

HttpURLConnection.getIfModifiedSince介绍

暂无

代码示例

代码示例来源:origin: square/okhttp

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: prestodb/presto

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: julian-klode/dns66

/**
 * Checks if we should read from the URL.
 *
 * @param connection The connection that was established.
 * @return true if there was no problem.
 * @throws IOException If an I/O Exception occured.
 */
boolean validateResponse(HttpURLConnection connection) throws IOException {
  Log.d(TAG, "validateResponse: " + item.title + ": local = " + new Date(connection.getIfModifiedSince()) + " remote = " + new Date(connection.getLastModified()));
  if (connection.getResponseCode() != 200) {
    Log.d(TAG, "validateResponse: " + item.title + ": Skipping: Server responded with " + connection.getResponseCode() + " for " + item.location);
    if (connection.getResponseCode() == 404) {
      parentTask.addError(item, context.getString(R.string.file_not_found));
    } else if (connection.getResponseCode() != 304) {
      context.getResources().getString(R.string.host_update_error_item);
      parentTask.addError(item, context.getResources().getString(R.string.host_update_error_item, connection.getResponseCode(), connection.getResponseMessage()));
    }
    return false;
  }
  return true;
}

代码示例来源:origin: org.jboss.errai/errai-tools

public long getIfModifiedSince() {
 if (this.urlConnection == null) return -1;
 return (this.urlConnection.getIfModifiedSince());
}

代码示例来源:origin: errai/errai

public long getIfModifiedSince() {
 if (this.urlConnection == null) return -1;
 return (this.urlConnection.getIfModifiedSince());
}

代码示例来源:origin: AgNO3/jcifs-ng

@Override
public long getIfModifiedSince () {
  return this.connection.getIfModifiedSince();
}

代码示例来源:origin: org.codelibs/jcifs

@Override
public long getIfModifiedSince () {
  return this.connection.getIfModifiedSince();
}

代码示例来源:origin: com.squareup.okhttp/okhttp-urlconnection

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: jcifs/jcifs

public long getIfModifiedSince() {
  return connection.getIfModifiedSince();
}

代码示例来源:origin: apiman/apiman

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: io.prestosql/presto-jdbc

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: com.github.ljun20160606/okhttp-urlconnection

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: com.squareup.okhttp3/okhttp-urlconnection

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: com.facebook.presto/presto-jdbc

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: kohsuke/jcifs

public long getIfModifiedSince() {
  return connection.getIfModifiedSince();
}

代码示例来源:origin: xap/xap

public long getIfModifiedSince() {
  return delegateConnection.getIfModifiedSince();
}

代码示例来源:origin: io.apiman/apiman-gateway-platforms-servlet

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: com.jaeksoft/jcifs-krb5-jdk7

public long getIfModifiedSince() {
  return connection.getIfModifiedSince();
}

代码示例来源:origin: prestosql/presto

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

代码示例来源:origin: apache/servicemix-bundles

@Override public long getIfModifiedSince() {
 return delegate.getIfModifiedSince();
}

相关文章

HttpURLConnection类方法