File src/de/openrat/client/util/HttpHeaderMap.java

Last commit: Fri Sep 30 22:45:01 2016 +0200	dankert	first version of the java api.
1 package de.openrat.client.util; 2 3 import java.util.Collection; 4 import java.util.HashMap; 5 import java.util.Map; 6 7 public class HttpHeaderMap 8 { 9 private Map<String, String> header = new HashMap<String, String>(); 10 11 /** 12 * @return 13 * @see java.util.Map#size() 14 */ 15 public int size() 16 { 17 return header.size(); 18 } 19 20 /** 21 * @param key 22 * @return 23 * @see java.util.Map#containsKey(java.lang.Object) 24 */ 25 public boolean containsKey(Object key) 26 { 27 return header.containsKey(key); 28 } 29 30 /** 31 * @param key 32 * @return 33 * @see java.util.Map#get(java.lang.Object) 34 */ 35 public String get(Object key) 36 { 37 return header.get(key); 38 } 39 40 /** 41 * @param key 42 * @param value 43 * @return 44 * @see java.util.Map#put(java.lang.Object, java.lang.Object) 45 */ 46 public String put(String key, String value) 47 { 48 return header.put(key, value); 49 } 50 51 /** 52 * @return 53 * @see java.util.Map#values() 54 */ 55 public Collection<String> values() 56 { 57 return header.values(); 58 } 59 60 public String toHttpHeaderString() 61 { 62 63 return new MapConverter(header).convertMapToString(": ", "\n", true); 64 } 65 66 public void putAll(HttpHeaderMap requestHeader) 67 { 68 header.putAll(requestHeader.header); 69 } 70 }
Download src/de/openrat/client/util/HttpHeaderMap.java
History Fri, 30 Sep 2016 22:45:01 +0200 dankert first version of the java api.