| java.lang.Object org.apache.pluto.util.StringUtils
StringUtils | public class StringUtils (Code) | | Static class hosting a couple of utility methods around strings.
|
Method Summary | |
public static String[] | copy(String[] source) | public static Map | copyParameters(Map parameters) Deep-clones a parameter map. | public static String | getMimeTypeWithoutEncoding(String mimeType) Strips the specified mime type by removing the character encoding
specified at the end of the mime type (all characters after the ';').
The stripped mime type is trimmed string which contains no white
spaces at the beginning and the end.
Parameters: mimeType - the mime type to strip. | public static String | replace(String source, String pattern, String replace) Replaces all occurrences of a pattern within a string by a replacement.
Parameters: source - the string that should be searched. Parameters: pattern - the pattern that should be replaced. Parameters: replace - the replacement that should be inserted instead of thepattern. |
copy | public static String[] copy(String[] source)(Code) | | TODO: can't we just use String[].clone()?
Parameters: source - |
copyParameters | public static Map copyParameters(Map parameters)(Code) | | Deep-clones a parameter map. The key is the parameter name as a String
instance, while the value is a String array (String[]) instance.
Parameters: parameters - the parameter map to deep-clone. the deep-cloned parameter map. |
getMimeTypeWithoutEncoding | public static String getMimeTypeWithoutEncoding(String mimeType)(Code) | | Strips the specified mime type by removing the character encoding
specified at the end of the mime type (all characters after the ';').
The stripped mime type is trimmed string which contains no white
spaces at the beginning and the end.
Parameters: mimeType - the mime type to strip. the stripped mime type. |
replace | public static String replace(String source, String pattern, String replace)(Code) | | Replaces all occurrences of a pattern within a string by a replacement.
Parameters: source - the string that should be searched. Parameters: pattern - the pattern that should be replaced. Parameters: replace - the replacement that should be inserted instead of thepattern. The updated source string. |
|
|