Java Utililty Methods Unsigned Number Create

List of utility methods to do Unsigned Number Create

Description

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

Method

intunsignedArrayCompareLex(byte[] a, byte[] b)
unsigned Array Compare Lex
return unsignedArrayCompareLex(a, 0, a.length, b, 0, b.length);
intunsignedArrayCompareLex(char[] a, char[] b)
unsigned Array Compare Lex
return unsignedArrayCompareLex(a, 0, a.length, b, 0, b.length);
intunsignedBinarySearch(final short[] array, final int begin, final int end, final short k)
Look for value k in array in the range [begin,end).
if (USE_HYBRID_BINSEARCH) {
    return hybridUnsignedBinarySearch(array, begin, end, k);
} else {
    return branchyUnsignedBinarySearch(array, begin, end, k);
intunsignedByte(int b)
returns the value in 0..255 which is equivalent mod 256
if (b < 0)
    return (b % 256) + 256;
return (b % 256);
byteunsignedByteFromInt(int i)
unsigned Byte From Int
return (byte) (i > 127 ? i - 256 : i); 
int[]unsignedBytesToInts(Byte[] bytes)
unsigned Bytes To Ints
int[] rtn = new int[bytes.length];
for (int i = 0; i < bytes.length; i++) {
    rtn[i] = unsignedByteToInt(bytes[i]);
return rtn;
intunsignedByteToInt(byte b)
Converts an unsigned byte to an integer.
return (int) b & 0xFF;
intunsignedByteToInt(byte b)
unsigned Byte To Int
return b & 0xff;
intunsignedByteToInt(byte in)
unsigned Byte To Int
int out = (int) in;
if (out < 0)
    out += 256;
return out;
intunsignedByteToInt(final byte b)
Drop the sign bits in a byte for conversion to an int.
return b & 0xFF;