*/ char[] target = new char[MAX_BUFFER_SIZE]; char[] source = str.toCharArray(); int requiredLength =  normalize(source,target,normalizationMode); if (requiredLength < MAX_BUFFER_SIZE){ target = new char[requiredLength]; normalize(source,target,normalizationMode); } return new String(target);
    public static String normalize( String str,                                     int normalizationMode)                                    throws Exception{         synchronized(retStr){            if(!check(normalizationMode)){                throw ErrorCode.getException(ErrorCode.U_ILLEGAL_ARGUMENT_ERROR);            }            int errorCode=  NativeNormalizer.normalize(str,                                                        normalizationMode,                                                        retStr);            if(ErrorCode.isFailure(errorCode)){                throw ErrorCode.getException(errorCode);            }            return retStr[0];         }                      }