Java Char to Byte charToByte(char[] values)

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

Description

char To Byte

License

Open Source License

Declaration

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

Method Source Code

//package com.java2s;

public class Main {
    public static byte[] charToByte(char[] values) {
        if (values == null) {
            return null;
        }/* w  w w. java 2 s .  com*/

        byte[] results = new byte[values.length];
        for (int i = 0; i < values.length; i++) {
            results[i] = (byte) values[i];
        }
        return results;
    }
}

Related

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