Java Utililty Methods Char Create

List of utility methods to do Char Create

  1. HOME
  2. Java
  3. C
  4. Char Create

Description

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

Method

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


AltStyle によって変換されたページ (->オリジナル) /