public File(Object fo) {
            Logger.getInstance().debug("Creating File with Obj: " + fo.toString());
            try {
                HashMap<String, Object> raw = (HashMap<String, Object>) fo;

                if (raw.containsKey("index")) {
                    index = Integer.parseInt(raw.get("index").toString());
                } else {
                    throw new RuntimeException("Download file has no index");
                }

                if (raw.containsKey("path")) {
                    path = raw.get("path").toString();
                } else {
                    throw new RuntimeException("Download file has no path");
                }

                if (raw.containsKey("length"))
                    length = Long.parseLong(raw.get("length").toString());

                if (raw.containsKey("selected"))
                    selected = Boolean.parseBoolean(raw.get("selected").toString());

                if (raw.containsKey("uris")) {
                    try {
                        Object urisList = raw.get("uris");
                        if (urisList.getClass().isArray()) {
                            Object[] urisArray = (Object[]) urisList;
                            // uris = new HashMap<String,
                            // String>(urisArray.length);

                            for (Object uo : urisArray) {
                                // uris.
                                uris.putAll((HashMap<String, String>) uo);
                                Logger.getInstance().debug("Uris: " + uris.toString());
                            }

                            // uris = (HashMap<String, String>)urisList;

                        } else {
                            throw new RuntimeException("Cannot obtain URIs list");
                        }
                    } catch (Exception e) {
                        Logger.getInstance().error("Error parsing URIs while creating File struct", e);
                    }
                }

            } catch (ClassCastException e) {
                throw new RuntimeException("Cannot parse download state", e);
            }
        }