Java – Parsing cookie headers in J2ME/BlackBerry apps

blackberrycookiesjavajava-me

When using an HttpConnection in a BlackBerry app, you often get HTTP cookies in the response headers. Unfortunately there are no built-in APIs to assist with the parsing of the cookie headers.

Has anyone found a third-party library to assist with the parsing of the cookie header(s) into a more useful data object? Creating some custom code that just parses out the name and value of the cookie isn't too difficult, but I'd like to also consider other fields within the cookie such as the expiration and domain fields.

Best Answer

Just to follow up on this topic - I just ended up writing my own code to do cookie parsing and persistence. I guess sometimes there just isn't an open-source library out there ready and waiting!

Related Topic