add map helpers to HttpParameters
This commit is contained in:
parent
845260a14e
commit
9435cc649b
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package org.xbib.netty.http.common;
|
||||
|
||||
import io.netty.handler.codec.http.HttpHeaderValues;
|
||||
import java.util.Map;
|
||||
import org.xbib.datastructures.common.MultiMap;
|
||||
import org.xbib.datastructures.common.Pair;
|
||||
import org.xbib.datastructures.common.TreeMultiMap;
|
||||
|
@ -32,6 +33,7 @@ public class HttpParameters {
|
|||
private static final Logger logger = Logger.getLogger(HttpParameters.class.getName());
|
||||
|
||||
private static final char EQUAL_CHAR = '=';
|
||||
|
||||
private static final char AMPERSAND_CHAR = '&';
|
||||
|
||||
private final MultiMap<String, String> multiMap;
|
||||
|
@ -60,6 +62,14 @@ public class HttpParameters {
|
|||
this.encoding = charset;
|
||||
}
|
||||
|
||||
public MultiMap<String, String> asMultiMap() {
|
||||
return multiMap;
|
||||
}
|
||||
|
||||
public Map<String, Collection<String>> asMap() {
|
||||
return multiMap.asMap();
|
||||
}
|
||||
|
||||
public CharSequence getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue