Java Char to Byte charToByte(char[] tab)

Here you can find the source of charToByte(char[] tab)

Description

char To Byte

License

Open Source License

Declaration

public static byte[] charToByte(char[] tab) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static byte[] charToByte(char[] tab) {
        byte[] result = new byte[tab.length];
        for (int i = 0; i < tab.length; i++) {
            result[i] = (byte) tab[i];
        }//from  www .  j ava  2  s.  c  om
        return result;
    }

    public static byte charToByte(char tab) {
        byte result = (byte) tab;

        return result;
    }
}

Related

  1. charToByte(char c)
  2. charToByte(char ch)
  3. charToByte(char ch)
  4. charToByte(char encodedChar)
  5. charToByte(char[] chars)
  6. charToByte(char[] values)
  7. charToByte(final char value)
  8. convertCharToByte(char firstChar, char secondChar)
  9. convertCharToByte(char[] from)