Package net.thauvin.erik.urlencoder
Object UrlEncoderUtil
-
- All Implemented Interfaces:
public class UrlEncoderUtilMost defensive approach to URL encoding and decoding.
Rules determined by combining the unreserved character set from RFC 3986 with the percent-encode set from application/x-www-form-urlencoded.
Both specs above support percent decoding of two hexadecimal digits to a binary octet, however their unreserved set of characters differs and
application/x-www-form-urlencodedadds conversion of space to+, which has the potential to be misunderstood.This library encodes with rules that will be decoded correctly in either case.
Geert Bevin (gbevin(remove) at uwyn dot com)
Erik C. Thauvin (erik@thauvin.net)
-
-
Field Summary
Fields Modifier and Type Field Description public final static UrlEncoderUtilINSTANCE
-
Method Summary
Modifier and Type Method Description final Stringdecode(String source, Boolean plusToSpace)Transforms a provided String into a new string, containing decoded URL characters in the UTF-8 encoding. final Stringencode(String source, String allow, Boolean spaceToPlus)Transforms a provided String object into a new string, containing only valid URL characters in the UTF-8 encoding.
-