docs: @SuppressWarnings("rawtypes")
  	public static Object toObject(File file, String encoding, Class<Map> cls) throws UnmarshalException, NoSuchPathException {
  		
  		if (file == null || !file.exists()) {
  			throw new NoSuchPathException("Could not find file");
  		} 
  		if (file.isDirectory()) {
  			throw new NoSuchPathException(String.format("%s is Directory", file.getAbsolutePath()));
  		}
  		
  		Object object = null;
  		
  		Unmarshaller bind = new XmlUnmarshaller(new ResourceReader().getFileStream(file, encoding));
  		bind.setRootClass(cls);
  		object = bind.unmarshal();
  
  
  		return object;
  	}