/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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(); }
/** * 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"); } }
/** * 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"); } }
/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * Sets {@code allowUserInteraction}. Unused by Android. */ public void setAllowUserInteraction(boolean newValue) { checkNotConnected(); this.allowUserInteraction = newValue; }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }