本文整理了Java中java.net.HttpURLConnection.getHeaderFieldLong()
方法的一些代码示例,展示了HttpURLConnection.getHeaderFieldLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpURLConnection.getHeaderFieldLong()
方法的具体详情如下:
包路径:java.net.HttpURLConnection
类名称:HttpURLConnection
方法名:getHeaderFieldLong
暂无
代码示例来源:origin: square/okhttp
@IgnoreJRERequirement // Should only be invoked on Java 8+ or Android API 24+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: prestodb/presto
@IgnoreJRERequirement // Should only be invoked on Java 7+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: EvoSuite/evosuite
@Override
public long getHeaderFieldLong(String name, long Default) {
return super.getHeaderFieldLong(name,Default);
}
代码示例来源:origin: com.github.ljun20160606/okhttp-urlconnection
@IgnoreJRERequirement // Should only be invoked on Java 7+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: io.prestosql/presto-jdbc
@IgnoreJRERequirement // Should only be invoked on Java 7+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: prestosql/presto
@IgnoreJRERequirement // Should only be invoked on Java 7+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: com.squareup.okhttp3/okhttp-urlconnection
@IgnoreJRERequirement // Should only be invoked on Java 8+ or Android API 24+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: com.facebook.presto/presto-jdbc
@IgnoreJRERequirement // Should only be invoked on Java 7+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: apache/servicemix-bundles
@IgnoreJRERequirement // Should only be invoked on Java 7+.
@Override public long getHeaderFieldLong(String field, long defaultValue) {
return delegate.getHeaderFieldLong(field, defaultValue);
}
代码示例来源:origin: apache/tajo
@Override
public long getTableVolume(TableDesc table, Optional<EvalNode> notUsed) {
HttpURLConnection connection = null;
try {
connection = (HttpURLConnection) new URL(table.getUri().toASCIIString()).openConnection();
connection.setRequestMethod("HEAD");
connection.connect();
return connection.getHeaderFieldLong(Names.CONTENT_LENGTH, -1);
} catch (IOException e) {
throw new TajoInternalError(e);
} finally {
if (connection != null) {
connection.disconnect();
}
}
}
代码示例来源:origin: com.microsoft.azure/azure-data-lake-store-sdk
String requestId = conn.getHeaderField("x-ms-request-id");
String responseContentType = conn.getHeaderField("Content-Type");
long responseContentLength = conn.getHeaderFieldLong("Content-Length", 0);
代码示例来源:origin: org.apache.hadoop/hadoop-azure
String requestId = conn.getHeaderField("x-ms-request-id");
String responseContentType = conn.getHeaderField("Content-Type");
long responseContentLength = conn.getHeaderFieldLong("Content-Length", 0);
代码示例来源:origin: org.apache.hadoop/hadoop-azure
this.recvResponseTimeMs += elapsedTimeMs(startTime);
this.bytesReceived = this.connection.getHeaderFieldLong(HttpHeaderConfigurations.CONTENT_LENGTH, 0);
} else {
代码示例来源:origin: com.microsoft.azure/azure-data-lake-store-sdk
resp.httpResponseMessage = conn.getResponseMessage();
resp.requestId = conn.getHeaderField("x-ms-request-id");
resp.responseContentLength = conn.getHeaderFieldLong("Content-Length", 0);
String chunked = conn.getHeaderField("Transfer-Encoding");
if (chunked != null && chunked.equals("chunked")) resp.responseChunked = true;
内容来源于网络,如有侵权,请联系作者删除!