Exemplo n.º 1
0
 @POST
 @Path("MultivaluedMap")
 @Consumes("application/x-www-form-urlencoded")
 @Produces("text/plain")
 public String mMapPost(MultivaluedMap<String, String> mmap) {
   return Converter.toForm(mmap).toString();
 }
 /**
  * Parse the supplied value and create an instance of <code>T</code>.
  *
  * @param value the string value
  * @return the newly created instance of <code>T</code>
  * @throws IllegalArgumentException if the supplied string cannot be parsed
  * @see javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate#fromString(java.lang.String)
  */
 public Cookie fromString(String string) throws IllegalArgumentException {
   return Converter.toJaxRsCookie(CookieReader.read(string));
 }
 /**
  * Convert the supplied value to a String.
  *
  * @param value the value of type <code>T</code>
  * @return a String representation of the value
  * @throws IllegalArgumentException if the supplied object cannot be serialized
  * @see javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate#toString(java.lang.Object)
  */
 public String toString(Cookie jaxRsCookie) {
   return CookieWriter.write(Converter.toRestletCookie(jaxRsCookie));
 }
 /**
  * Convert the supplied value to a String.
  *
  * @param value the value of type <code>T</code>
  * @return a String representation of the value
  * @throws IllegalArgumentException if the supplied object cannot be serialized
  * @see javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate#toString(java.lang.Object)
  */
 public String toString(NewCookie newCookie) {
   return CookieSettingWriter.write(Converter.toRestletCookieSetting(newCookie));
 }