本文整理了Java中java.net.HttpURLConnection.getHeaderFieldInt()
方法的一些代码示例,展示了HttpURLConnection.getHeaderFieldInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpURLConnection.getHeaderFieldInt()
方法的具体详情如下:
包路径:java.net.HttpURLConnection
类名称:HttpURLConnection
方法名:getHeaderFieldInt
暂无
代码示例来源:origin: square/okhttp
@Override public int getHeaderFieldInt(String field, int defaultValue) {
return delegate.getHeaderFieldInt(field, defaultValue);
}
代码示例来源:origin: prestodb/presto
@Override public int getHeaderFieldInt(String field, int defaultValue) {
return delegate.getHeaderFieldInt(field, defaultValue);
}
代码示例来源:origin: Azure/azure-storage-android
/**
* Parses out the share quota value from a <code>java.net.HttpURLConnection</code>.
*
* @param request
* the request to get attributes from
* @return the share quota (in GB) or <code>null</code> if none is specified
*/
static Integer parseShareQuota(final HttpURLConnection request) {
Integer shareQuota = request.getHeaderFieldInt(FileConstants.SHARE_QUOTA_HEADER, -1);
return (shareQuota == -1) ? null : shareQuota;
}
代码示例来源:origin: com.microsoft.azure/azure-storage
/**
* Parses out the share quota value from a <code>java.net.HttpURLConnection</code>.
*
* @param request
* the request to get attributes from
* @return the share quota (in GB) or <code>null</code> if none is specified
*/
static Integer parseShareQuota(final HttpURLConnection request) {
Integer shareQuota = request.getHeaderFieldInt(FileConstants.SHARE_QUOTA_HEADER, -1);
return (shareQuota == -1) ? null : shareQuota;
}
代码示例来源:origin: apiman/apiman
@Override public int getHeaderFieldInt(String field, int defaultValue) {
return delegate.getHeaderFieldInt(field, defaultValue);
}
代码示例来源:origin: EvoSuite/evosuite
@Override
public int getHeaderFieldInt(String name, int Default) {
return super.getHeaderFieldInt(name,Default);
}
代码示例来源:origin: hgoebl/DavidWebb
/**
* Returns the value of the named field parsed as a number.
* <br>
* See <a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#getHeaderFieldInt(java.lang.String,+int)">
* URLConnection.getHeaderFieldInt()</a>
*
* @param field name of the header field
* @param defaultValue the default value if the field is not present or malformed
* @return the value of the named header field, or the given default value
*/
public int getHeaderFieldInt(String field, int defaultValue) {
return connection.getHeaderFieldInt(field, defaultValue);
}
代码示例来源:origin: Coolerfall/Android-HttpDownloadManager
int getContentLength(HttpURLConnection conn) {
String transferEncoding = conn.getHeaderField(TRANSFER_ENCODING);
if (transferEncoding == null || transferEncoding.equalsIgnoreCase("chunked")) {
return conn.getHeaderFieldInt(CONTENT_LENGTH, -1);
} else {
return -1;
}
}
}
代码示例来源:origin: org.codelibs/jcifs
@Override
public int getHeaderFieldInt ( String header, int def ) {
handshake();
return this.connection.getHeaderFieldInt(header, def);
}
代码示例来源:origin: kohsuke/jcifs
public int getHeaderFieldInt(String header, int def) {
try {
handshake();
} catch (IOException ex) { }
return connection.getHeaderFieldInt(header, def);
}
代码示例来源:origin: jcifs/jcifs
public int getHeaderFieldInt(String header, int def) {
try {
handshake();
} catch (IOException ex) { }
return connection.getHeaderFieldInt(header, def);
}
代码示例来源:origin: AgNO3/jcifs-ng
@Override
public int getHeaderFieldInt ( String header, int def ) {
handshake();
return this.connection.getHeaderFieldInt(header, def);
}
代码示例来源:origin: com.jaeksoft/jcifs-krb5-jdk7
public int getHeaderFieldInt(String header, int def) {
try {
handshake();
} catch (IOException ex) { }
return connection.getHeaderFieldInt(header, def);
}
代码示例来源:origin: com.github.mcpat.gcf/gcf-standard
public final int getHeaderFieldInt(String name, int def) throws IOException {
ensureOpen();
return connection.getHeaderFieldInt(name, def);
}
代码示例来源:origin: org.kie.remote/kie-remote-common
private int intResponseHeader( final String name ) throws KieRemoteHttpRequestException {
closeOutputQuietly();
return getConnection().getHeaderFieldInt(name, -1);
}
代码示例来源:origin: kiegroup/droolsjbpm-integration
private int responseContentLength() {
closeOutputQuietly();
return getConnection().getHeaderFieldInt(CONTENT_LENGTH, -1);
}
代码示例来源:origin: org.kie.server/kie-server-common
private int intResponseHeader( final String name ) throws KieServerHttpRequestException {
closeOutputQuietly();
return getConnection().getHeaderFieldInt(name, -1);
}
代码示例来源:origin: org.kie.server/kie-server-common
private int responseContentLength() {
closeOutputQuietly();
return getConnection().getHeaderFieldInt(CONTENT_LENGTH, -1);
}
代码示例来源:origin: kiegroup/droolsjbpm-integration
private int intResponseHeader( final String name ) throws KieServerHttpRequestException {
closeOutputQuietly();
return getConnection().getHeaderFieldInt(name, -1);
}
代码示例来源:origin: org.kie.remote/kie-remote-common
private int responseContentLength() {
closeOutputQuietly();
return getConnection().getHeaderFieldInt(CONTENT_LENGTH, -1);
}
内容来源于网络,如有侵权,请联系作者删除!