private static Object newInstance(Class c) throws IOException
    {
        Constructor constructor = _constructors.get(c);
        if (constructor != null)
        {
            Class[] paramTypes = constructor.getParameterTypes();
            if (paramTypes == null || paramTypes.length == 0)
            {
                try
                {
                    return constructor.newInstance();
                }
                catch (Exception e)
                {
                    throw new IOException("Could not instantiate " + c.getName());
                }
            }
            Object[] values = fillArgs(paramTypes);
            try
            {
                return constructor.newInstance(values);
            }
            catch (Exception e)
            {
                throw new IOException("Could not instantiate " + c.getName());
            }
        }
        Object[] ret = newInstanceEx(c);
        _constructors.put(c, (Constructor) ret[0]);
        return ret[1];
    }