| java.lang.Object com.sun.cldchi.tools.memoryprofiler.jdwp.Tools
Tools | class Tools (Code) | | This class contains some auxillary functions that are used by
classes of jdwp package.
|
Method Summary | |
public static String | Hex(long b, int length) Returns a hex representation of long value with
leading zeros. | public static String | Left(String source, int length) Truncates or increases the specified string to the specified
length. | public static String | PadL(String source, int length, String what) Addes the specified substring to the beginning of the specified string
a few times until the length of the string becomes not less than the
specified length. | public static String | PadL(String source, int length) Addes spaces to the beginning of the specified string
a few times until the length of the string becomes not less than the
specified length. | public static String | PadR(String source, int length, String what) Appends the specified substring to the end of the specified string
a few times until the length of the string becomes not less than the
specified length. | public static String | PadR(String source, int length) Appends spaces to the end of the specified string
a few times until the length of the string becomes not less than the
specified length. | public static String | Right(String source, int length) Truncates or increases the specified string to the specified
length. | public static int | countBytes(String s) Returns a number of tokens in the string. | public static String | listVector(Vector v) Returns a content of the vector as a string where elements of the vector
are separated by tabs. | public static byte[] | str2bytes(String s) Converts a string that is a list of bytes separated by
spaces, colons, commas and tab characters
(for example, 01,15,44,135 ) to byte array. | public static void | wait(int delay) Suspends the current thread for the specified number of
milliseconds. |
Hex | public static String Hex(long b, int length)(Code) | | Returns a hex representation of long value with
leading zeros.
Parameters: b - an integer value Parameters: length - a size of the integer value (2 for short ,4 for int , 8 for long ) a hex representation of long value withleading zeros |
Left | public static String Left(String source, int length)(Code) | | Truncates or increases the specified string to the specified
length. If the source string is less that the desired length the
necessary number of spaces is added to the end of the string.
If the source string is more
than the desired length the necessary number of last characters is
removed.
Parameters: source - a sring to be aligned Parameters: length - a desired length of the string an aligned string |
PadL | public static String PadL(String source, int length, String what)(Code) | | Addes the specified substring to the beginning of the specified string
a few times until the length of the string becomes not less than the
specified length. If the length of the string is already more than
the specified length the resulting value if a string of asterisks with
the specified length.
Parameters: source - a source string to align Parameters: length - a desired length of the result string Parameters: what - a substring that must be appended to the beginning of thestring an aligned string |
PadL | public static String PadL(String source, int length)(Code) | | Addes spaces to the beginning of the specified string
a few times until the length of the string becomes not less than the
specified length. If the length of the string is already more than
the specified length the resulting value if a string of asterisks with
the specified length.
Parameters: source - a source string to align Parameters: length - a desired length of the result string an aligned string |
PadR | public static String PadR(String source, int length, String what)(Code) | | Appends the specified substring to the end of the specified string
a few times until the length of the string becomes not less than the
specified length. If the length of the string is already more than
the specified length the resulting value if a string of asterisks with
the specified length.
Parameters: source - a source string to align Parameters: length - a desired length of the result string Parameters: what - a substring that must be appended to the end of thestring an aligned string |
PadR | public static String PadR(String source, int length)(Code) | | Appends spaces to the end of the specified string
a few times until the length of the string becomes not less than the
specified length. If the length of the string is already more than
the specified length the resulting value if a string of asterisks with
the specified length.
Parameters: source - a source string to align Parameters: length - a desired length of the result string an aligned string |
Right | public static String Right(String source, int length)(Code) | | Truncates or increases the specified string to the specified
length. If the source string is less that the desired length the
necessary number of spaces is added to the beginning of the string.
If the source string is more
than the desired length the necessary number of first characters is
removed.
Parameters: source - a sring to be aligned Parameters: length - a desired length of the string an aligned string |
countBytes | public static int countBytes(String s)(Code) | | Returns a number of tokens in the string. Token delimiters are
spaces, colons, commas and tab characters.
Parameters: a - string that consist on tokens and delimiteres. a number of tokens in the string |
listVector | public static String listVector(Vector v)(Code) | | Returns a content of the vector as a string where elements of the vector
are separated by tabs.
Parameters: v - a vector that should be represented as a string a string representation of the vector |
str2bytes | public static byte[] str2bytes(String s) throws Exception(Code) | | Converts a string that is a list of bytes separated by
spaces, colons, commas and tab characters
(for example, 01,15,44,135 ) to byte array.
Parameters: s - a string to be converted an array of bytes that corresponds to the source string |
wait | public static void wait(int delay)(Code) | | Suspends the current thread for the specified number of
milliseconds.
Parameters: delay - suspend time in milliseconds |
|
|