¡@

Home 

2014/10/16 ¤W¤È 08:21:12

android Programming Glossary: paramvalue

How to parse a cookie string

http://stackoverflow.com/questions/5574530/how-to-parse-a-cookie-string

rawCookieParamNameAndValue.length 2 throw new Exception Invalid cookie attribute not a flag or missing value. String paramValue rawCookieParamNameAndValue 1 .trim if paramName.equalsIgnoreCase expires Date expiryDate DateFormat.getDateTimeInstance.. 1 .trim if paramName.equalsIgnoreCase expires Date expiryDate DateFormat.getDateTimeInstance DateFormat.FULL .parse paramValue cookie.setExpiryDate expiryDate else if paramName.equalsIgnoreCase max age long maxAge Long.parseLong paramValue Date.. paramValue cookie.setExpiryDate expiryDate else if paramName.equalsIgnoreCase max age long maxAge Long.parseLong paramValue Date expiryDate new Date System.getCurrentTimeMillis maxAge cookie.setExpiryDate expiryDate else if paramName.equalsIgnoreCase..