Here you can find the source of charToByte(char c)
public static Byte charToByte(char c)
//package com.java2s; //License from project: LGPL public class Main { public static Byte charToByte(char c) { if (c >= Byte.MIN_VALUE && c <= Byte.MAX_VALUE) { return (byte) c; }/*w w w. j ava2s. com*/ return null; } public static byte charToByte(char c, byte defaultValue) { if (c >= Byte.MIN_VALUE && c <= Byte.MAX_VALUE) { return (byte) c; } return defaultValue; } }