Java Utililty Methods Char Create

List of utility methods to do Char Create

Description

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

Method

chartoChar(byte b)
Converts (signed) byte to (unsigned) char.
return (char) (b & 0xFF);
chartoChar(byte value)
to Char
return (char) toUnsignedInt(value);
chartoChar(byte[] b, int off)
to Char
return (char) (((b[off + 1] & 0xFF) << 0) + ((b[off + 0] & 0xFF) << 8));
StringtoChar(byte[] buffer)
to Char
StringBuilder builder = new StringBuilder(buffer.length);
for (byte b : buffer) {
    builder.append(toChar(b));
return builder.toString();
StringtoChar(byte[] buffer)
to Char
StringBuilder builder = new StringBuilder(buffer.length);
for (byte b : buffer) {
    builder.append(toChar(b));
return builder.toString();
chartoChar(byte[] byteArray)
to Char
if (byteArray == null || byteArray.length != 2)
    return 0x0;
return (char) ((0xff & byteArray[0]) << 8 | (0xff & byteArray[1]) << 0);
chartoChar(byte[] bytes)
Converts a byte array to a char value
return toChar(bytes, 0);
chartoChar(byte[] si, boolean isReverseOrder)
Convert a byte[] to the corresponding char value.
int i = 0;
if (isReverseOrder) {
    si = reverseOrder(si, 2);
char c = (char) ((i | (char) si[0]) << 8);
c |= (char) si[1];
return c;
chartoChar(final String bitString)
Convert a bit string into a char value.
assert (bitString.length() <= Character.SIZE);
return (char) toLong(bitString);
StringtoChar(int c)
to Char
int pos = Math.abs(c);
return String.valueOf(CHARS.charAt(pos));