| |
|
| java.lang.Object com.sun.midp.io.Util
Util | abstract public class Util (Code) | | Contains static utility methods for IO protocol classes to use.
|
getCommaSeparatedValues | public static Vector getCommaSeparatedValues(String input)(Code) | | Create a vector of values from a string containing comma separated
values. The values cannot contain a comma. The output values will be
trimmed of whitespace. The vector may contain zero length strings
where there are 2 commas in a row or a comma at the end of the input
string.
Parameters: input - input string of comma separated values vector of string values. |
getDelimSeparatedValues | public static Vector getDelimSeparatedValues(String input, char delim)(Code) | | Create a vector of values from a string containing delimiter separated
values. The values cannot contain the delimiter. The output values will
be trimmed of whitespace. The vector may contain zero length strings
where there are 2 delimiters in a row or a comma at the end of the input
string.
Parameters: input - input string of delimiter separated values Parameters: delim - the delimiter separating values vector of string values. |
getHttpMediaType | public static String getHttpMediaType(String contentType)(Code) | | Parses out the media-type from the given HTTP content-type field and
converts it to lower case.
The media-type everything for the ';' that marks the parameters.
Parameters: contentType - value of the content-type field media-type in lower case |
toCString | public static byte[] toCString(String string)(Code) | | Converts string into a null terminated
byte array. Expects the characters in string
to be in th ASCII range (0-127 base 10).
Parameters: string - the string to convert byte array with contents of string |
toJavaString | public static String toJavaString(byte[] cString)(Code) | | Converts an ASCII null terminated byte array in to a
String . Expects the characters in byte array
to be in th Ascii range (0-127 base 10).
Parameters: cString - the byte array to convert string with contents of the byte array exception: ArrayIndexOutOfBounds - if the C string does not end with 0 |
|
|
|