Tabnine Logo
Cookie2.setVersionAttributeSpecified
Code IndexAdd Tabnine to your IDE (free)

How to use
setVersionAttributeSpecified
method
in
org.apache.commons.httpclient.cookie.Cookie2

Best Java code snippets using org.apache.commons.httpclient.cookie.Cookie2.setVersionAttributeSpecified (Showing top 5 results out of 315)

origin: commons-httpclient/commons-httpclient

/**
 * Parse cookie version attribute.
 */
public void parse(final Cookie cookie, final String value)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if (value == null) {
      throw new MalformedCookieException(
          "Missing value for version attribute");
    }
    int version = -1;
    try {
      version = Integer.parseInt(value);
    } catch (NumberFormatException e) {
      version = -1;
    }
    if (version < 0) {
      throw new MalformedCookieException("Invalid cookie version.");
    }
    cookie2.setVersion(version);
    cookie2.setVersionAttributeSpecified(true);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Parse cookie version attribute.
 */
public void parse(final Cookie cookie, final String value)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if (value == null) {
      throw new MalformedCookieException(
          "Missing value for version attribute");
    }
    int version = -1;
    try {
      version = Integer.parseInt(value);
    } catch (NumberFormatException e) {
      version = -1;
    }
    if (version < 0) {
      throw new MalformedCookieException("Invalid cookie version.");
    }
    cookie2.setVersion(version);
    cookie2.setVersionAttributeSpecified(true);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Parse cookie version attribute.
 */
public void parse(final Cookie cookie, final String value)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if (value == null) {
      throw new MalformedCookieException(
          "Missing value for version attribute");
    }
    int version = -1;
    try {
      version = Integer.parseInt(value);
    } catch (NumberFormatException e) {
      version = -1;
    }
    if (version < 0) {
      throw new MalformedCookieException("Invalid cookie version.");
    }
    cookie2.setVersion(version);
    cookie2.setVersionAttributeSpecified(true);
  }
}
origin: org.apache.commons/httpclient

/**
 * Parse cookie version attribute.
 */
public void parse(final Cookie cookie, final String value)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if (value == null) {
      throw new MalformedCookieException(
          "Missing value for version attribute");
    }
    int version = -1;
    try {
      version = Integer.parseInt(value);
    } catch (NumberFormatException e) {
      version = -1;
    }
    if (version < 0) {
      throw new MalformedCookieException("Invalid cookie version.");
    }
    cookie2.setVersion(version);
    cookie2.setVersionAttributeSpecified(true);
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Parse cookie version attribute.
 */
public void parse(final Cookie cookie, final String value)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if (value == null) {
      throw new MalformedCookieException(
          "Missing value for version attribute");
    }
    int version = -1;
    try {
      version = Integer.parseInt(value);
    } catch (NumberFormatException e) {
      version = -1;
    }
    if (version < 0) {
      throw new MalformedCookieException("Invalid cookie version.");
    }
    cookie2.setVersion(version);
    cookie2.setVersionAttributeSpecified(true);
  }
}
org.apache.commons.httpclient.cookieCookie2setVersionAttributeSpecified

Javadoc

Indicates whether the cookie had a version attribute specified in the Set-Cookie2 response header.

Popular methods of Cookie2

  • <init>
    Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute,
  • getDomain
  • getExpiryDate
  • getName
  • getPath
  • getPorts
    Get the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request
  • getValue
  • getVersion
  • isDomainAttributeSpecified
  • isPathAttributeSpecified
  • isPortAttributeBlank
  • isPortAttributeSpecified
  • isPortAttributeBlank,
  • isPortAttributeSpecified,
  • isVersionAttributeSpecified,
  • setCommentURL,
  • setDiscard,
  • setPortAttributeBlank,
  • setPortAttributeSpecified,
  • setPorts,
  • setVersion

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now