class EnvironmentVariableProvider {

    public char[] getEnvAsCharArray(String name) {
        return Optional.ofNullable(System.getenv(name))
            .map(String::toCharArray)
            .orElse(null);
    }

}