I have implemented customized encoding mechanism for javaUTF16. Does this implementation support all the characters?  public class Encoding {    public static void main(String[] args) {        byte [] arr = new byte[1000];        String str = abcde ; //even this encoding works supplementary characters        Encode(arr,0,str);        System.out.println(Decode(arr,str.length()));    }public static byte[] Encode(byte[] ByteArray , int offset ,String str) {        char[] ch = str.toCharArray();        for(char c : ch) {        ByteArray[offset++] = (byte) (c >>> 8);        ByteArray[offset++] = (byte) (c & 0xff);        }        return ByteArray;    }    public static String Decode(byte[] ByteArray ,int len) {        char [] res = new char[len*2];        int i = 0;        int offset = 0;        while(i < len) {    res[i] = (char) ((ByteArray[offset++] << 8) | (ByteArray[offset++] & 0xff));            i++;        }        return new String(res);    }} 
Customised Java UTF-16
java;strings;unicode