Lines Matching refs:cookies
131 public List<Header> formatCookies(List<Cookie> cookies) {
132 if (cookies == null) {
133 throw new IllegalArgumentException("List of cookies may not be null");
135 if (cookies.isEmpty()) {
136 throw new IllegalArgumentException("List of cookies may not be empty");
138 if (cookies.size() > 1) {
140 cookies = new ArrayList<Cookie>(cookies);
141 Collections.sort(cookies, PATH_COMPARATOR);
144 return doFormatOneHeader(cookies);
146 return doFormatManyHeaders(cookies);
150 private List<Header> doFormatOneHeader(final List<Cookie> cookies) {
153 for (Cookie cookie : cookies) {
158 CharArrayBuffer buffer = new CharArrayBuffer(40 * cookies.size());
163 for (Cookie cooky : cookies) {
173 private List<Header> doFormatManyHeaders(final List<Cookie> cookies) {
174 List<Header> headers = new ArrayList<Header>(cookies.size());
175 for (Cookie cookie : cookies) {