code: public static ProjectReader getProjectReader(String name) throws MPXJException
     {
        int index = name.lastIndexOf('.');
        if (index == -1)
        {
           throw new IllegalArgumentException("Filename has no extension: " + name);
        }
  
        String extension = name.substring(index + 1).toUpperCase();
  
        Class<? extends ProjectReader> fileClass = READER_MAP.get(extension);
        if (fileClass == null)
        {
           throw new IllegalArgumentException("Cannot read files of type: " + extension);
        }
  
        try
        {
           ProjectReader file = fileClass.newInstance();
           return (file);
        }
  
        catch (Exception ex)
        {
           throw new MPXJException("Failed to load project reader", ex);
        }
     }
docs: Retrieves a ProjectReader instance which can read a file of the
  type specified by the supplied file name.
  
  @param name file name
  @return ProjectReader instance