delete old message
[jSite2.git] / src / net / pterodactylus / util / fcp / ARK.java
index 27c37f7..fb80827 100644 (file)
@@ -3,7 +3,7 @@ package net.pterodactylus.util.fcp;
 /**
  * Container for ARKs (address resolution keys).
  * 
- * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
+ * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
  * @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