public final class Utility extends Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static StringBuffer |
appendNumber(StringBuffer result,
int n)
Append a number to the given StringBuffer in the radix 10
generating at least one digit.
|
static StringBuffer |
appendNumber(StringBuffer result,
int n,
int radix,
int minDigits)
Append a number to the given StringBuffer in the given radix.
|
static String |
hex(char ch)
Convert a char to 4 hex uppercase digits.
|
static StringBuffer |
hex(char ch,
StringBuffer output)
Convert a char to 4 hex uppercase digits.
|
static String |
hex(int ch,
int width)
Convert a integer to size width (minimum) hex uppercase digits.
|
static StringBuffer |
hex(int ch,
int width,
StringBuffer output)
Convert a integer to size width hex uppercase digits.
|
static String |
hex(long ch) |
static String |
hex(long i,
int places)
Supplies a zero-padded hex representation of an integer (without 0x)
|
static String |
hex(String s)
Convert a string to comma-separated groups of 4 hex uppercase
digits.
|
static String |
hex(StringBuffer s)
Convert a string to comma-separated groups of 4 hex uppercase
digits.
|
static StringBuffer |
hex(String s,
StringBuffer result)
Convert a string to comma-separated groups of 4 hex uppercase
digits.
|
public static String hex(char ch)
public static String hex(String s)
public static String hex(StringBuffer s)
public static StringBuffer hex(char ch, StringBuffer output)
public static StringBuffer hex(int ch, int width, StringBuffer output)
public static String hex(int ch, int width)
public static StringBuffer appendNumber(StringBuffer result, int n)
public static StringBuffer appendNumber(StringBuffer result, int n, int radix, int minDigits) throws IllegalArgumentException
result - the digits of the number are appended heren - the number to be converted to digits; may be negative.
If negative, a '-' is prepended to the digits.radix - a radix from 2 to 36 inclusive.minDigits - the minimum number of digits, not including
any '-', to produce. Values less than 2 have no effect. One
digit is always emitted regardless of this parameter.IllegalArgumentExceptionpublic static String hex(long i, int places)
public static String hex(long ch)
public static StringBuffer hex(String s, StringBuffer result)
Copyright © 2010 - 2020 Adobe. All Rights Reserved