Class CookieReader

    • Field Detail

      • globalVersion

        private volatile int globalVersion
        The global cookie specification version.
    • Constructor Detail

      • CookieReader

        public CookieReader​(java.lang.String header)
        Constructor.
        Parameters:
        header - The header to read.
    • Method Detail

      • read

        public static Cookie read​(java.lang.String cookie)
                           throws java.lang.IllegalArgumentException
        Parses the given String to a Cookie
        Parameters:
        cookie -
        Returns:
        the Cookie parsed from the String
        Throws:
        java.lang.IllegalArgumentException - Thrown if the String can not be parsed as Cookie.
      • readPair

        private Parameter readPair​(boolean readAttribute)
                            throws java.io.IOException
        Reads the next pair as a parameter.
        Parameters:
        readAttribute - True, if the intention is to read only cookie attribute.
        Returns:
        The next pair as a parameter.
        Throws:
        java.io.IOException
      • readValue

        public Cookie readValue()
                         throws java.io.IOException
        Description copied from class: HeaderReader
        Read the next value. There can be multiple values for a single header. Returns null by default.
        Overrides:
        readValue in class HeaderReader<Cookie>
        Returns:
        The next value.
        Throws:
        java.io.IOException