From 9435cc649bae01e2ac2d2ef588b1cb72924f7ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Thu, 6 Apr 2023 14:40:30 +0200 Subject: [PATCH] add map helpers to HttpParameters --- .../org/xbib/netty/http/common/HttpParameters.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/netty-http-common/src/main/java/org/xbib/netty/http/common/HttpParameters.java b/netty-http-common/src/main/java/org/xbib/netty/http/common/HttpParameters.java index 215cff8..43407ec 100644 --- a/netty-http-common/src/main/java/org/xbib/netty/http/common/HttpParameters.java +++ b/netty-http-common/src/main/java/org/xbib/netty/http/common/HttpParameters.java @@ -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 multiMap; @@ -60,6 +62,14 @@ public class HttpParameters { this.encoding = charset; } + public MultiMap asMultiMap() { + return multiMap; + } + + public Map> asMap() { + return multiMap.asMap(); + } + public CharSequence getContentType() { return contentType; }