Add constructor to set an identifier
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 11 Jul 2015 09:37:10 +0000 (11:37 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 11 Jul 2015 09:37:10 +0000 (11:37 +0200)
src/main/java/net/pterodactylus/fcp/AddPeer.java

index e9ad80d..0aa899e 100644 (file)
@@ -46,6 +46,11 @@ public class AddPeer extends FcpMessage {
                setField("File", file);
        }
 
+       public AddPeer(String identifier, String file) {
+               this(file);
+               setField("Identifier", identifier);
+       }
+
        /**
         * Creates a new “AddPeer” request that reads the noderef of the peer from
         * the given URL.