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

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

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

origin: commons-httpclient/commons-httpclient

/**
 * Return a string suitable for sending in a <tt>"Cookie"</tt> header as
 * defined in RFC 2965
 * @param cookie a {@link org.apache.commons.httpclient.Cookie} to be formatted as string
 * @return a string suitable for sending in a <tt>"Cookie"</tt> header.
 */
public String formatCookie(final Cookie cookie) {
  LOG.trace("enter RFC2965Spec.formatCookie(Cookie)");
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    int version = cookie2.getVersion();
    final StringBuffer buffer = new StringBuffer();
    this.formatter.format(buffer, new NameValuePair("$Version", Integer.toString(version)));
    buffer.append("; ");
    doFormatCookie2(cookie2, buffer);
    return buffer.toString();
  } else {
    // old-style cookies are formatted according to the old rules
    return this.rfc2109.formatCookie(cookie);
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Return a string suitable for sending in a <tt>"Cookie"</tt> header as
 * defined in RFC 2965
 * @param cookie a {@link org.apache.commons.httpclient.Cookie} to be formatted as string
 * @return a string suitable for sending in a <tt>"Cookie"</tt> header.
 */
public String formatCookie(final Cookie cookie) {
  LOG.trace("enter RFC2965Spec.formatCookie(Cookie)");
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    int version = cookie2.getVersion();
    final StringBuffer buffer = new StringBuffer();
    this.formatter.format(buffer, new NameValuePair("$Version", Integer.toString(version)));
    buffer.append("; ");
    doFormatCookie2(cookie2, buffer);
    return buffer.toString();
  } else {
    // old-style cookies are formatted according to the old rules
    return this.rfc2109.formatCookie(cookie);
  }
}
origin: org.apache.commons/httpclient

/**
 * Return a string suitable for sending in a <tt>"Cookie"</tt> header as
 * defined in RFC 2965
 * @param cookie a {@link org.apache.commons.httpclient.Cookie} to be formatted as string
 * @return a string suitable for sending in a <tt>"Cookie"</tt> header.
 */
public String formatCookie(final Cookie cookie) {
  LOG.trace("enter RFC2965Spec.formatCookie(Cookie)");
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    int version = cookie2.getVersion();
    final StringBuffer buffer = new StringBuffer();
    this.formatter.format(buffer, new NameValuePair("$Version", Integer.toString(version)));
    buffer.append("; ");
    doFormatCookie2(cookie2, buffer);
    return buffer.toString();
  } else {
    // old-style cookies are formatted according to the old rules
    return this.rfc2109.formatCookie(cookie);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Return a string suitable for sending in a <tt>"Cookie"</tt> header as
 * defined in RFC 2965
 * @param cookie a {@link org.apache.commons.httpclient.Cookie} to be formatted as string
 * @return a string suitable for sending in a <tt>"Cookie"</tt> header.
 */
public String formatCookie(final Cookie cookie) {
  LOG.trace("enter RFC2965Spec.formatCookie(Cookie)");
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    int version = cookie2.getVersion();
    final StringBuffer buffer = new StringBuffer();
    this.formatter.format(buffer, new NameValuePair("$Version", Integer.toString(version)));
    buffer.append("; ");
    doFormatCookie2(cookie2, buffer);
    return buffer.toString();
  } else {
    // old-style cookies are formatted according to the old rules
    return this.rfc2109.formatCookie(cookie);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Return a string suitable for sending in a <tt>"Cookie"</tt> header as
 * defined in RFC 2965
 * @param cookie a {@link org.apache.commons.httpclient.Cookie} to be formatted as string
 * @return a string suitable for sending in a <tt>"Cookie"</tt> header.
 */
public String formatCookie(final Cookie cookie) {
  LOG.trace("enter RFC2965Spec.formatCookie(Cookie)");
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    int version = cookie2.getVersion();
    final StringBuffer buffer = new StringBuffer();
    this.formatter.format(buffer, new NameValuePair("$Version", Integer.toString(version)));
    buffer.append("; ");
    doFormatCookie2(cookie2, buffer);
    return buffer.toString();
  } else {
    // old-style cookies are formatted according to the old rules
    return this.rfc2109.formatCookie(cookie);
  }
}
org.apache.commons.httpclient.cookieCookie2getVersion

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
  • isDomainAttributeSpecified
  • isPathAttributeSpecified
  • isPortAttributeBlank
  • isPortAttributeSpecified
  • isVersionAttributeSpecified
  • isPortAttributeSpecified,
  • isVersionAttributeSpecified,
  • setCommentURL,
  • setDiscard,
  • setPortAttributeBlank,
  • setPortAttributeSpecified,
  • setPorts,
  • setVersion,
  • setVersionAttributeSpecified

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • startActivity (Activity)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JCheckBox (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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