I would like to take a Cookie string (as it might be returned in a Set-Cookie header) and be able to easily modify parts of it, specifically the expiration date.
I s
How about java.net.HttpCookie:
List cookies = HttpCookie.parse(header);