Apache CXF API

org.apache.cxf.jaxrs.utils
Class FormUtils

java.lang.Object
  extended by org.apache.cxf.jaxrs.utils.FormUtils

public final class FormUtils
extends Object


Field Summary
static String FORM_PARAM_MAP
           
 
Method Summary
static void addPropertyToForm(javax.ws.rs.core.MultivaluedMap<String,String> map, String name, Object value)
           
static String formToString(javax.ws.rs.core.Form form)
           
static void logRequestParametersIfNeeded(Map<String,List<String>> params, String enc)
           
static void populateMapFromMultipart(javax.ws.rs.core.MultivaluedMap<String,String> params, MultipartBody body, Message m, boolean decode)
           
static void populateMapFromString(javax.ws.rs.core.MultivaluedMap<String,String> params, Message m, String postBody, String enc, boolean decode)
           
static void populateMapFromString(javax.ws.rs.core.MultivaluedMap<String,String> params, Message m, String postBody, String enc, boolean decode, javax.servlet.http.HttpServletRequest request)
           
static String readBody(InputStream is, String encoding)
           
static javax.ws.rs.core.Form readForm(FormEncodingProvider<javax.ws.rs.core.Form> provider, Message message)
           
static void restoreForm(FormEncodingProvider<javax.ws.rs.core.Form> provider, javax.ws.rs.core.Form form, Message message)
           
static void writeForm(FormEncodingProvider<javax.ws.rs.core.Form> provider, javax.ws.rs.core.Form form, OutputStream os)
           
static void writeMapToOutputStream(Map<String,List<String>> map, OutputStream os, String enc, boolean encoded)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORM_PARAM_MAP

public static final String FORM_PARAM_MAP
See Also:
Constant Field Values
Method Detail

formToString

public static String formToString(javax.ws.rs.core.Form form)

restoreForm

public static void restoreForm(FormEncodingProvider<javax.ws.rs.core.Form> provider,
                               javax.ws.rs.core.Form form,
                               Message message)
                        throws Exception
Throws:
Exception

writeForm

public static void writeForm(FormEncodingProvider<javax.ws.rs.core.Form> provider,
                             javax.ws.rs.core.Form form,
                             OutputStream os)
                      throws Exception
Throws:
Exception

readForm

public static javax.ws.rs.core.Form readForm(FormEncodingProvider<javax.ws.rs.core.Form> provider,
                                             Message message)
                                      throws Exception
Throws:
Exception

addPropertyToForm

public static void addPropertyToForm(javax.ws.rs.core.MultivaluedMap<String,String> map,
                                     String name,
                                     Object value)

readBody

public static String readBody(InputStream is,
                              String encoding)

populateMapFromString

public static void populateMapFromString(javax.ws.rs.core.MultivaluedMap<String,String> params,
                                         Message m,
                                         String postBody,
                                         String enc,
                                         boolean decode)

populateMapFromString

public static void populateMapFromString(javax.ws.rs.core.MultivaluedMap<String,String> params,
                                         Message m,
                                         String postBody,
                                         String enc,
                                         boolean decode,
                                         javax.servlet.http.HttpServletRequest request)

logRequestParametersIfNeeded

public static void logRequestParametersIfNeeded(Map<String,List<String>> params,
                                                String enc)

writeMapToOutputStream

public static void writeMapToOutputStream(Map<String,List<String>> map,
                                          OutputStream os,
                                          String enc,
                                          boolean encoded)
                                   throws IOException
Throws:
IOException

populateMapFromMultipart

public static void populateMapFromMultipart(javax.ws.rs.core.MultivaluedMap<String,String> params,
                                            MultipartBody body,
                                            Message m,
                                            boolean decode)

Apache CXF API

Apache CXF