public final class Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l)
Same as
breadcrumbPath(urlPrefix, l, '/'). |
static java.lang.String |
breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l,
char sep)
Same as
breadcrumbPath(urlPrefix, l, sep, "", false). |
static java.lang.String |
breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l,
char sep,
java.lang.String urlPostfix,
boolean compact)
Create a breadcrumb path to allow navigation to each element of a path.
|
static java.lang.String |
encode(java.lang.String s)
Converts different html special characters into their encodings used in html
currently used only for tooltips of annotation revision number view
|
static java.lang.String |
formQuoteEscape(java.lang.String q) |
static void |
htmlize(char[] cs,
int length,
java.lang.Appendable out) |
static java.lang.String |
htmlize(java.lang.CharSequence q) |
static void |
htmlize(java.lang.CharSequence q,
java.lang.Appendable out)
Append a character sequence to an
Appendable object. |
static void |
htmlize(java.lang.CharSequence q,
java.lang.StringBuilder out)
Append a character sequence to a
StringBuilder
object. |
static void |
readableLine(int num,
java.io.Writer out,
Annotation annotation) |
static java.lang.String |
redableSize(long num) |
static java.lang.String |
uid(java.lang.String path,
java.lang.String date)
Append path and date into a string in such a way that lexicographic
sorting gives the same results as a walk of the file hierarchy.
|
static java.lang.String |
uid2url(java.lang.String uid) |
static java.lang.String |
URIEncode(java.lang.String q)
wrapper arround UTF-8 URL encoding of a string
|
static java.lang.String |
URIEncodePath(java.lang.String path) |
static java.lang.String |
versionParameter()
used by BUI - CSS needs this parameter for proper cache refresh (per changeset) in client browser
|
public static java.lang.String htmlize(java.lang.CharSequence q)
public static void htmlize(java.lang.CharSequence q,
java.lang.Appendable out)
throws java.io.IOException
Appendable object. Escape
special characters for HTML.q - a character sequenceout - the object to append the character sequence tojava.io.IOException - if an I/O error occurspublic static void htmlize(java.lang.CharSequence q,
java.lang.StringBuilder out)
StringBuilder
object. Escape special characters for HTML. This method is identical to
htmlize(CharSequence,Appendable), except that it is
guaranteed not to throw IOException because it uses a
StringBuilder.q - a character sequenceout - the object to append the character sequence tohtmlize(CharSequence, Appendable)public static void htmlize(char[] cs,
int length,
java.lang.Appendable out)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String versionParameter()
public static java.lang.String breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l)
breadcrumbPath(urlPrefix, l, '/').breadcrumbPath(String, String, char)public static java.lang.String breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l,
char sep)
breadcrumbPath(urlPrefix, l, sep, "", false).public static java.lang.String breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l,
char sep,
java.lang.String urlPostfix,
boolean compact)
urlPrefix - what comes before the path in the URLl - the full path from which the breadcrumb path is builtsep - the character that separates the path elements in lurlPostfix - what comes after the path in the URLcompact - if true, remove .. and empty path
elements from the path in the linkspublic static java.lang.String redableSize(long num)
public static java.lang.String encode(java.lang.String s)
s - input textpublic static void readableLine(int num,
java.io.Writer out,
Annotation annotation)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String uid(java.lang.String path,
java.lang.String date)
public static java.lang.String uid2url(java.lang.String uid)
public static java.lang.String URIEncode(java.lang.String q)
q - query to be encodedpublic static java.lang.String URIEncodePath(java.lang.String path)
public static java.lang.String formQuoteEscape(java.lang.String q)