Here you can find the source of toCharArray(byte[] input)
Parameter | Description |
---|---|
input | - the byte array |
public static char[] toCharArray(byte[] input)
//package com.java2s; public class Main { /**//w ww .ja v a 2 s . co m * Rewrite a byte array as a char array * * @param input - * the byte array * @return char array */ public static char[] toCharArray(byte[] input) { char[] result = new char[input.length]; for (int i = 0; i < input.length; i++) { result[i] = (char) input[i]; } return result; } }