public static boolean isValidJavaEncoding(String javaEncoding) {
        if (javaEncoding != null) {
            int length = javaEncoding.length();
            if (length > 0) {
                for (int i = 1; i < length; i++) {
                    char c = javaEncoding.charAt(i);
                    if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
                            (c < '0' || c > '9') && c != '.' && c != '_' &&
                            c != '-') {
                        return false;
                    }
                }
                return true;
            }
        }
        return false;
    }
Returns true if the encoding name is a valid Java encoding.
This method does not verify that there is a decoder available
for this encoding, only that the characters are valid for an
Java encoding name.

@param javaEncoding The Java encoding name.
stroom-util/src/main/java/stroom/util/xml/XMLChar.java