Java Utililty Methods Integer Convert To

List of utility methods to do Integer Convert To

Description

The list of methods to do Integer Convert To are organized into topic(s).

Method

int[]convertIntegerToInt(Integer[] values)
convert Integer To Int
int[] intValues = new int[values.length];
for (int i = 0; i < values.length; i++)
    intValues[i] = values[i];
return intValues;
StringconvertIntegerToTwoCharString(int integer)
convert Integer To Two Char String
String string;
if (integer < 10) {
    string = "0" + Integer.toString(integer);
} else {
    string = Integer.toString(integer);
return string;
StringconvertInteralNameToResourceName(String type1)
convert Interal Name To Resource Name
String result = type1;
return result + ".class";
StringconvertInternalClassNameToQualifiedName(String className)
This method converts given qualified class name to internal name by replacing / with .
if (className == null) {
    return className;
return className.replace(SLASH, DOT);
StringconvertInternalFormToQualifiedClassName(final String classInternalName)
Helper method that converts from the internal class name format (as used in the Constant Pool) to a fully-qualified class name.
String out = classInternalName.replaceAll("/", "\\.");
return out;
intconvertIntFromBytes(byte[] byteArray)
convert Int From Bytes
return convertIntFromBytes(byteArray, 0);
int[]convertIntfwl(String[] idArray)
convert idArray to [].
int[] desArray = new int[idArray.length];
for (int i = 0; i < desArray.length; i++) {
    try {
        desArray[i] = Integer.parseInt(idArray[i]);
    } catch (NumberFormatException e) {
        desArray[i] = 0;
return desArray;
int[]convertIntList(Integer[] list)
convert Int List
if (list == null)
    return null;
int[] result = new int[list.length];
for (int i = 0; i < list.length; i++)
    result[i] = list[i].intValue();
return result;
IntegerconvertIntoRange(Integer inValue, int inSteps, int inMin, int inMax)
Adds values to the given value until it is a value within the range of min and max by adding/substracting the steps value
if (inValue == null) {
    return null;
if (inMin > inMax) {
    final int t = inMax;
    inMax = inMin;
    inMin = t;
if (inValue >= inMin && inValue <= inMax) {
    return inValue;
while (inValue < inMin) {
    inValue += inSteps;
while (inValue > inMax) {
    inValue -= inSteps;
return inValue < inMin || inValue > inMax ? null : inValue;
StringconvertIntToDayOfWeek(int day)
convert Int To Day Of Week
switch (day) {
case 1:
    return "MON";
case 2:
    return "TUE";
case 3:
    return "WED";
case 4:
...