Java Utililty Methods Number Parse

List of utility methods to do Number Parse

Description

The list of methods to do Number Parse are organized into topic(s).

Method

Number[]toNumberArray(byte[] array)
Turns the byte array into a Byte array.
Byte[] result;
int i;
result = new Byte[array.length];
for (i = 0; i < array.length; i++)
    result[i] = new Byte(array[i]);
return result;
Number[][]toNumberMatrix(byte[][] matrix)
Turns the Number matrix into one consisting of primitive bytes.
Byte[][] result;
int i;
int n;
result = new Byte[matrix.length][];
for (i = 0; i < matrix.length; i++) {
    result[i] = new Byte[matrix[i].length];
    for (n = 0; n < matrix[i].length; n++)
        result[i][n] = new Byte(matrix[i][n]);
...
StringtoNumberPassword(int length)
to Number Password
if (length < 1)
    return null;
String strChars[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
StringBuffer strPassword = new StringBuffer();
int nRand = (int) Math.round(Math.random() * 100D);
for (int i = 0; i < length; i++) {
    nRand = (int) Math.round(Math.random() * 100D);
    strPassword.append(strChars[nRand % (strChars.length - 1)]);
...
int[]toNumbers(char[] array_)
to Numbers
int[] new_ = new int[array_.length];
for (int i = 0; i < new_.length; i++)
    new_[i] = (int) array_[i] & 0x0FFFF;
return new_;