1
14
15 package com.liferay.util.servlet.filters;
16
17 import com.liferay.util.servlet.Header;
18
19 import java.io.Serializable;
20
21 import java.util.HashMap;
22 import java.util.List;
23 import java.util.Map;
24
25
30 public class CacheResponseData implements Serializable {
31
32 public CacheResponseData(
33 byte[] content, int contentLength, String contentType,
34 Map<String, List<Header>> headers) {
35
36 _content = content;
37 _contentLength = contentLength;
38 _contentType = contentType;
39 _headers = headers;
40 }
41
42 public Object getAttribute(String name) {
43 return _attributes.get(name);
44 }
45
46 public byte[] getContent() {
47 return _content;
48 }
49
50 public int getContentLength() {
51 return _contentLength;
52 }
53
54 public String getContentType() {
55 return _contentType;
56 }
57
58 public Map<String, List<Header>> getHeaders() {
59 return _headers;
60 }
61
62 public void setAttribute(String name, Object value) {
63 _attributes.put(name, value);
64 }
65
66 private Map<String, Object> _attributes = new HashMap<String, Object>();
67 private byte[] _content;
68 private int _contentLength;
69 private String _contentType;
70 private Map<String, List<Header>> _headers;
71
72 }