Package nl.vpro.util
Class URLPathEncode
java.lang.Object
nl.vpro.util.URLPathEncode
- Since:
- 1.64.1
- Author:
- Michiel Meeuwissen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @PolyNull String
static @PolyNull String
Escapes every character of the input string for the path part of a URL.static @PolyNull String
Escapes every character of the input string for the path part of a URL.static @PolyNull String
encodePath
(@PolyNull String input) Escapes every character of the input string for the path part of an URL, but only after splitting it by /.static @PolyNull String
encodePath
(@PolyNull String input, boolean spaceIsPlus)
-
Constructor Details
-
URLPathEncode
public URLPathEncode()
-
-
Method Details
-
encode
Escapes every character of the input string for the path part of a URL.This differs from
URLEncoder.encode(String, String)
that it will leave more characters untouched (seeisSafe(char)
, and that space will be replaced by +; -
encode
Escapes every character of the input string for the path part of a URL.- See Also:
-
decode
-
encodePath
Escapes every character of the input string for the path part of an URL, but only after splitting it by /. Afterwards join with '/' again. This avoids that the / itself is escaped too, and this function can be used to escape all the constituents of a path separately. -
encodePath
-