bodyBuilder.appendFormalLine("enc = " + getShortName(WEB_UTILS)
+ ".DEFAULT_CHARACTER_ENCODING;");
bodyBuilder.indentRemove();
bodyBuilder.appendFormalLine("}");
bodyBuilder.appendFormalLine("try {");
bodyBuilder.indent();
bodyBuilder.appendFormalLine("pathSegment = " + getShortName(URI_UTILS)
+ ".encodePathSegment(pathSegment, enc);");
bodyBuilder.indentRemove();
bodyBuilder.appendFormalLine("} catch ("
+ getShortName(UNSUPPORTED_ENCODING_EXCEPTION) + " uee) {}");