misim
Class Util
java.lang.Object
|
+--misim.Util
- public class Util
- extends java.lang.Object
Static utility class for formating strings.
Constructor Summary |
Util()
|
Method Summary |
static java.lang.String |
binaryString(int value)
Return the given value as a eight character binary string |
static java.lang.String |
byteString(int value)
Return the given value as a two character hex string |
static java.lang.String |
decString(int value)
Return the given value as a four character decimal string |
static java.lang.String |
expandTabs(java.lang.String text)
Expand any tab characters in the input string to spaces. |
static int |
getJavaVersion()
Check the current version of Java so that we can deal with any
differences that occur between implementations and releases |
static java.lang.String |
intString(int value)
Return the given value as a hexidecimal string of the
format "0xNN.." |
static java.lang.String |
wordString(int value)
Return the given value as a four character hex string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JVM_UNKNOWN
public static final int JVM_UNKNOWN
JVM_1_0
public static final int JVM_1_0
JVM_1_1
public static final int JVM_1_1
JVM_1_2
public static final int JVM_1_2
JVM_1_3
public static final int JVM_1_3
JVM_1_4
public static final int JVM_1_4
JVM_1_5
public static final int JVM_1_5
Util
public Util()
getJavaVersion
public static int getJavaVersion()
- Check the current version of Java so that we can deal with any
differences that occur between implementations and releases
byteString
public static java.lang.String byteString(int value)
- Return the given value as a two character hex string
- Parameters:
value
- The value to encode- Returns:
- The hexidecimal representation of the value
wordString
public static java.lang.String wordString(int value)
- Return the given value as a four character hex string
- Parameters:
value
- The value to encode- Returns:
- The hexidecimal representation of the value
intString
public static java.lang.String intString(int value)
- Return the given value as a hexidecimal string of the
format "0xNN.."
- Parameters:
value
- The value to encode- Returns:
- The hexidecimal representation of the value
decString
public static java.lang.String decString(int value)
- Return the given value as a four character decimal string
- Parameters:
value
- The value to encode- Returns:
- The decimal representation of the value
binaryString
public static java.lang.String binaryString(int value)
- Return the given value as a eight character binary string
- Parameters:
value
- The value to encode- Returns:
- The binary representation of the value
expandTabs
public static java.lang.String expandTabs(java.lang.String text)
- Expand any tab characters in the input string to spaces.
- Parameters:
value
- The string to expand- Returns:
- The expanded string, with tab stops every eight characters