private float[] readColor(StringTokenizer tokenizer) {
        float[] components = new float[5];
        float[] result;
        int i = 0;

        while (tokenizer.hasMoreTokens()) {
            String token = tokenizer.nextToken();
            try {
                components[i] = Float.parseFloat(token);
                i++;
            } catch (NumberFormatException e) {
                errors.add(new WavefrontLoaderError(file, "Unexpected token " + token));
            }
        }
        switch (i) {
            case 1:
                // Java arrays are dumb - if we could create a Vector or ArrayList of floats we could just .toArray, but no we have to member by member copy to an array of the correct length
                result = new float[1];
                result[0] = components[0];
                return result;
            case 3:
                result = new float[3];
                result[0] = components[0];
                result[1] = components[1];
                result[2] = components[2];
                return result;
        }
        return null;
    }