org.jboss.netty.handler.codec.http2
Class CookieDecoder

java.lang.Object
  extended by org.jboss.netty.handler.codec.http2.CookieDecoder

public class CookieDecoder
extends Object

Decodes an HTTP header value into Cookies. This decoder can decode the HTTP cookie version 0, 1, and 2.

 HttpRequest req = ...;
 String value = req.getHeader("Cookie");
 Set<Cookie> cookies = new CookieDecoder().decode(value);
 

Version:
$Rev: 1107 $, $Date: 2012-04-15 19:00:57 +0200 (dim., 15 avr. 2012) $
Author:
The Netty Project, Andy Taylor (andy.taylor@jboss.org), Trustin Lee
See Also:
CookieEncoder

Constructor Summary
CookieDecoder()
          Creates a new decoder.
CookieDecoder(boolean lenient)
          Creates a new decoder.
 
Method Summary
 Set<Cookie> decode(String header)
          Decodes the specified HTTP header value into Cookies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieDecoder

public CookieDecoder()
Creates a new decoder.


CookieDecoder

public CookieDecoder(boolean lenient)
Creates a new decoder.

Parameters:
lenient - ignores cookies with the name 'HTTPOnly' instead of throwing an exception
Method Detail

decode

public Set<Cookie> decode(String header)
Decodes the specified HTTP header value into Cookies.

Returns:
the decoded Cookies


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.