URI simplification in java -


i have several strings being combined make uri. want ensure resulting uri simple possible. example, given

str1 = "/dir1/dir2"; str2 = "./dir3/"; 

i want end "/dir1/dir2/dir3/" not "/dir1/dir2/./dir3/".

is there java library performs kind of simplification?

jdk7 has path.normalize method removes redundant name elements path. contains path.resolve can used join 2 paths.

take @ java tutorial | path operations more information.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -