public P2PFile getLocalP2PFile(MetaP2P file) { for (P2PFile pFile : getLocalFiles()) if (pFile.getMetaPFile().equals(file)) return pFile; return null; }
public P2PFile addLocalFile(File file) throws CreateP2PFileException, IOException { P2PFile pFile = P2PFile.importLocalFile(file); localFiles.add(pFile); return pFile; }