List of utility methods to do Integer Pad Zero
byte[] | zeroPadArray(byte[] source, int size) Pad a byte array with zeroes. byte[] data = new byte[size]; for (int i = 0; i < data.length; i++) { if (i < source.length) data[i] = source[i]; else data[i] = 0; return data; ... |
String | ZeroPadded(Integer i) Zero Padded String result = "" + i; if (i < 10) result = "0" + result; return result; |
String | zeroPaddedHex(int n, int length) zero Padded Hex return padLeft(Integer.toHexString(n), length, '0'); |
String | zeroPaddedInt(int num, int length) zero Padded Int String val = String.valueOf(num); while (val.length() < length) { val = "0" + val; return val; |
String | zeroPadInteger(int i) zero Pad Integer return padTo(Integer.toString(i), MAX_INT_CHAR_WIDTH, '0'); |