|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pluto.util.StringUtils
public class StringUtils
Static class hosting a couple of utility methods around strings.
Method Summary | |
---|---|
static java.lang.String[] |
copy(java.lang.String[] source)
TODO: can't we just use String[].clone()? |
static java.util.Map |
copyParameters(java.util.Map parameters)
Deep-clones a parameter map. |
static java.lang.String |
getMimeTypeWithoutEncoding(java.lang.String mimeType)
Strips the specified mime type by removing the character encoding specified at the end of the mime type (all characters after the ';'). |
static java.lang.String |
replace(java.lang.String source,
java.lang.String pattern,
java.lang.String replace)
Replaces all occurrences of a pattern within a string by a replacement. |
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 replace(java.lang.String source, java.lang.String pattern, java.lang.String replace)
source
- the string that should be searched.pattern
- the pattern that should be replaced.replace
- the replacement that should be inserted instead of the
pattern.
public static java.lang.String[] copy(java.lang.String[] source)
source
-
public static java.util.Map copyParameters(java.util.Map parameters)
parameters
- the parameter map to deep-clone.
public static java.lang.String getMimeTypeWithoutEncoding(java.lang.String mimeType)
mimeType
- the mime type to strip.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |