|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nu.staldal.lsp.Utils
public final class Utils
Some utility methods. All methods in this class are static.
Method Summary | |
---|---|
static boolean |
absoluteURL(java.lang.String url)
Check whether an URL is absolute. |
static java.lang.String |
encodePath(java.lang.String path)
Encode a path name or URL into a filename. |
static java.lang.String |
encodePathAsIdentifier(java.lang.String path)
Encode a path name or URL into a Java identifier. |
static java.lang.String |
nChars(int n,
char c)
Generate a String with a specified number
of a given character. |
static boolean |
pseudoAbsoluteURL(java.lang.String url)
Check whether an URL is pseudo-absolute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String encodePath(java.lang.String path)
path
- the path to encode
public static java.lang.String encodePathAsIdentifier(java.lang.String path)
path
- the path to encode
public static boolean absoluteURL(java.lang.String url)
url
- the URL to check
true
if the URL contains at least one colon, and
the first colon is before the first slash (if any).public static boolean pseudoAbsoluteURL(java.lang.String url)
url
- the URL to check
true
if the URL start with a slash.public static java.lang.String nChars(int n, char c)
String
with a specified number
of a given character.
n
- character countc
- the character
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |