本文整理了Java中java.net.URLConnection.checkNotConnected()
方法的一些代码示例,展示了URLConnection.checkNotConnected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URLConnection.checkNotConnected()
方法的具体详情如下:
包路径:java.net.URLConnection
类名称:URLConnection
方法名:checkNotConnected
暂无
代码示例来源:origin: robovm/robovm
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: robovm/robovm
/**
* Sets the flag indicating whether this {@code URLConnection} allows input.
* It cannot be set after the connection is established.
*
* @param newValue
* the new value for the flag to be set.
* @throws IllegalAccessError
* if this method attempts to change the value after the
* connection has been already established.
* @see #doInput
*/
public void setDoInput(boolean newValue) {
checkNotConnected();
this.doInput = newValue;
}
代码示例来源:origin: robovm/robovm
/**
* Sets the flag indicating whether this connection allows to use caches or
* not. This method can only be called prior to the connection
* establishment.
*
* @param newValue
* the value of the flag to be set.
* @throws IllegalStateException
* if this method attempts to change the flag after the
* connection has been established.
* @see #useCaches
*/
public void setUseCaches(boolean newValue) {
checkNotConnected();
this.useCaches = newValue;
}
代码示例来源:origin: robovm/robovm
/**
* Returns the value of the request header property specified by {code field}
* or {@code null} if there is no field with this name. The base
* implementation of this method returns always {@code null}.
*
* @param field
* the name of the request header property.
* @return the value of the property.
* @throws IllegalStateException
* if the connection has been already established.
*/
public String getRequestProperty(String field) {
checkNotConnected();
return null;
}
代码示例来源:origin: robovm/robovm
/**
* Sets the flag indicating whether this {@code URLConnection} allows
* output. It cannot be set after the connection is established.
*
* @param newValue
* the new value for the flag to be set.
* @throws IllegalAccessError
* if this method attempts to change the value after the
* connection has been already established.
* @see #doOutput
*/
public void setDoOutput(boolean newValue) {
checkNotConnected();
this.doOutput = newValue;
}
代码示例来源:origin: robovm/robovm
/**
* Sets the point of time since when the data must be modified to be
* transmitted. Some protocols transmit data only if it has been modified
* more recently than a particular time. The data will be transmitted
* regardless of its timestamp if this option is set to {@code 0}.
*
* @param newValue
* the time in milliseconds since January 1, 1970 GMT.
* @throws IllegalStateException
* if this {@code URLConnection} has already been connected.
* @see #ifModifiedSince
*/
public void setIfModifiedSince(long newValue) {
checkNotConnected();
this.ifModifiedSince = newValue;
}
代码示例来源:origin: robovm/robovm
/**
* Returns an unmodifiable map of general request properties used by this
* connection. The request property names are the key values of the map. The
* map values are lists of property values of the corresponding key name.
*
* @return the request-property representing generic map.
* @since 1.4
*/
public Map<String, List<String>> getRequestProperties() {
checkNotConnected();
return Collections.emptyMap();
}
代码示例来源:origin: robovm/robovm
/**
* Adds the given property to the request header. Existing properties with
* the same name will not be overwritten by this method.
*
* @param field
* the request property field name to add.
* @param newValue
* the value of the property which is to add.
* @throws IllegalStateException
* if the connection has been already established.
* @throws NullPointerException
* if the property name is {@code null}.
* @since 1.4
*/
public void addRequestProperty(String field, String newValue) {
checkNotConnected();
if (field == null) {
throw new NullPointerException("field == null");
}
}
代码示例来源:origin: robovm/robovm
/**
* Sets the value of the specified request header field. The value will only
* be used by the current {@code URLConnection} instance. This method can
* only be called before the connection is established.
*
* @param field
* the request header field to be set.
* @param newValue
* the new value of the specified property.
* @throws IllegalStateException
* if the connection has been already established.
* @throws NullPointerException
* if the parameter {@code field} is {@code null}.
*/
public void setRequestProperty(String field, String newValue) {
checkNotConnected();
if (field == null) {
throw new NullPointerException("field == null");
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: MobiVM/robovm
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: ibinti/bugvm
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Sets {@code allowUserInteraction}. Unused by Android.
*/
public void setAllowUserInteraction(boolean newValue) {
checkNotConnected();
this.allowUserInteraction = newValue;
}
代码示例来源:origin: MobiVM/robovm
/**
* Returns an unmodifiable map of general request properties used by this
* connection. The request property names are the key values of the map. The
* map values are lists of property values of the corresponding key name.
*
* @return the request-property representing generic map.
* @since 1.4
*/
public Map<String, List<String>> getRequestProperties() {
checkNotConnected();
return Collections.emptyMap();
}
代码示例来源:origin: ibinti/bugvm
/**
* Returns an unmodifiable map of general request properties used by this
* connection. The request property names are the key values of the map. The
* map values are lists of property values of the corresponding key name.
*
* @return the request-property representing generic map.
* @since 1.4
*/
public Map<String, List<String>> getRequestProperties() {
checkNotConnected();
return Collections.emptyMap();
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Returns an unmodifiable map of general request properties used by this
* connection. The request property names are the key values of the map. The
* map values are lists of property values of the corresponding key name.
*
* @return the request-property representing generic map.
* @since 1.4
*/
public Map<String, List<String>> getRequestProperties() {
checkNotConnected();
return Collections.emptyMap();
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Returns an unmodifiable map of general request properties used by this
* connection. The request property names are the key values of the map. The
* map values are lists of property values of the corresponding key name.
*
* @return the request-property representing generic map.
* @since 1.4
*/
public Map<String, List<String>> getRequestProperties() {
checkNotConnected();
return Collections.emptyMap();
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Returns an unmodifiable map of general request properties used by this
* connection. The request property names are the key values of the map. The
* map values are lists of property values of the corresponding key name.
*
* @return the request-property representing generic map.
* @since 1.4
*/
public Map<String, List<String>> getRequestProperties() {
checkNotConnected();
return Collections.emptyMap();
}
内容来源于网络,如有侵权,请联系作者删除!