Tabnine Logo
RFC2965Spec.doFormatCookie2
Code IndexAdd Tabnine to your IDE (free)

How to use
doFormatCookie2
method
in
org.apache.commons.httpclient.cookie.RFC2965Spec

Best Java code snippets using org.apache.commons.httpclient.cookie.RFC2965Spec.doFormatCookie2 (Showing top 10 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: commons-httpclient/commons-httpclient

Cookie2 cookie = (Cookie2) cookies[i];
doFormatCookie2(cookie, buffer);
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.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/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);
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

Cookie2 cookie = (Cookie2) cookies[i];
doFormatCookie2(cookie, buffer);
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

Cookie2 cookie = (Cookie2) cookies[i];
doFormatCookie2(cookie, buffer);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

Cookie2 cookie = (Cookie2) cookies[i];
doFormatCookie2(cookie, buffer);
origin: org.apache.commons/httpclient

Cookie2 cookie = (Cookie2) cookies[i];
doFormatCookie2(cookie, buffer);
org.apache.commons.httpclient.cookieRFC2965SpecdoFormatCookie2

Popular methods of RFC2965Spec

  • <init>
    Default constructor
  • createPortAttribute
    Retrieves valid Port attribute value for the given ports array. e.g. "8000,8001,8002"
  • domainMatch
    Performs domain-match as defined by the RFC2965. Host A's name domain-matches host B's if 1. their h
  • findAttribHandler
    Finds an attribute handler CookieAttributeHandler for the given attribute. Returns null if no attrib
  • getAttribHandlerIterator
  • getEffectiveHost
    Gets 'effective host name' as defined in RFC 2965. If a host name contains no dots, the effective ho
  • getVersion
  • parse
    Parses the Set-Cookie2 value into an array of Cookies.The syntax for the Set-Cookie2 response header
  • parseAttribute
    Parse RFC 2965 specific cookie attribute and update the corresponsing org.apache.commons.httpclient.
  • pathMatch
  • registerAttribHandler
  • registerAttribHandler

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Sublime Text 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