X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FARK.java;h=fb808271c1287b00cd88b1e62f41d837e73b8bff;hb=80677f6dc7c772aef6322d075a0584f31c6a3c7f;hp=27c37f7389d1e12db8942531377adc1eecc16e82;hpb=474a0f39c87d520b0ce8c23ea8e8046441e13ea7;p=jSite2.git diff --git a/src/net/pterodactylus/util/fcp/ARK.java b/src/net/pterodactylus/util/fcp/ARK.java index 27c37f7..fb80827 100644 --- a/src/net/pterodactylus/util/fcp/ARK.java +++ b/src/net/pterodactylus/util/fcp/ARK.java @@ -3,7 +3,7 @@ package net.pterodactylus.util.fcp; /** * Container for ARKs (address resolution keys). * - * @author David Roden + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @version $Id$ */ public class ARK { @@ -11,6 +11,9 @@ public class ARK { /** The public URI of the ARK. */ private final String publicURI; + /** The private URI of the ARK. */ + private final String privateURI; + /** The number of the ARK. */ private final int number; @@ -23,10 +26,25 @@ public class ARK { * The number of the ARK */ public ARK(String publicURI, String number) { + this(publicURI, null, number); + } + + /** + * Creates a new ARK with the given URIs and number. + * + * @param publicURI + * The public URI of the ARK + * @param privateURI + * The private URI of the ARK + * @param number + * The number of the ARK + */ + public ARK(String publicURI, String privateURI, String number) { if ((publicURI == null) || (number == null)) { throw new NullPointerException(((publicURI == null) ? "publicURI" : "number") + " must not be null"); } this.publicURI = publicURI; + this.privateURI = privateURI; try { this.number = Integer.valueOf(number); } catch (NumberFormatException nfe1) { @@ -44,6 +62,15 @@ public class ARK { } /** + * Returns the private URI of the ARK. + * + * @return The private URI of the ARK + */ + public String getPrivateURI() { + return privateURI; + } + + /** * Returns the number of the ARK. * * @return The number of the ARK