Fix copyright line.
[jFCPlib.git] / src / net / pterodactylus / fcp / GetFailed.java
index 095c82e..c01bf2b 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * jSite2 - GetFailed.java -
- * Copyright © 2008 David Roden
+ * jFCPlib - GetFailed.java - Copyright © 2008 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,14 +27,14 @@ import java.util.Map.Entry;
  * The “GetFailed” message signals the client that a {@link ClientGet} request
  * has failed. This also means that no further progress messages for that
  * request will be sent.
- * 
+ *
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  */
 public class GetFailed extends BaseMessage {
 
        /**
         * Creates a new “GetFailed” message that wraps the received message.
-        * 
+        *
         * @param receivedMessage
         *            The received message
         */
@@ -45,9 +44,9 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the code of the error.
-        * 
-        * @return The code of the error, or <code>-1</code> if the error code
-        *         could not be parsed
+        *
+        * @return The code of the error, or <code>-1</code> if the error code could
+        *         not be parsed
         */
        public int getCode() {
                return FcpUtils.safeParseInt(getField("Code"));
@@ -55,7 +54,7 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the identifier of the request.
-        * 
+        *
         * @return The identifier of the request
         */
        public String getIdentifier() {
@@ -64,7 +63,7 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns whether the request is on the global queue.
-        * 
+        *
         * @return <code>true</code> if the request is on the global queue,
         *         <code>false</code> if it is on the client-local queue
         */
@@ -74,7 +73,7 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the description of the error code.
-        * 
+        *
         * @return The description of the error code
         */
        public String getCodeDescription() {
@@ -83,7 +82,7 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the extra description of the error.
-        * 
+        *
         * @return The extra description of the error
         */
        public String getExtraDescription() {
@@ -92,7 +91,7 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the short description of the error.
-        * 
+        *
         * @return The short description of the error
         */
        public String getShortCodeDescription() {
@@ -101,9 +100,9 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the expected data length, if already knows.
-        * 
-        * @return The expected data length, or <code>-1</code> if the length
-        *         could not be parsed
+        *
+        * @return The expected data length, or <code>-1</code> if the length could
+        *         not be parsed
         */
        public long getExpectedDataLength() {
                return FcpUtils.safeParseLong(getField("ExpectedDataLength"));
@@ -111,7 +110,7 @@ public class GetFailed extends BaseMessage {
 
        /**
         * Returns the expected content type of the request.
-        * 
+        *
         * @return The expected content type
         */
        public String getExpectedMetadataContentType() {
@@ -123,7 +122,7 @@ public class GetFailed extends BaseMessage {
         * and {@link #getExpectedMetadataContentType()}) have already been
         * finalized and can be trusted. If the values have not been finalized that
         * can change over time.
-        * 
+        *
         * @return <code>true</code> if the expected values have already been
         *         finalized, <code>false</code> otherwise
         */
@@ -135,7 +134,7 @@ public class GetFailed extends BaseMessage {
         * Returns the URI the request is redirected to (in case of a request for a
         * USK). This is returned so that client applications know that the URI of
         * the key has updated.
-        * 
+        *
         * @return The URI the request was redirected to
         */
        public String getRedirectURI() {
@@ -157,13 +156,13 @@ public class GetFailed extends BaseMessage {
         * Returns a list of complex error codes with the message. Use
         * {@link #getComplexErrorDescription(int)} and
         * {@link #getComplexErrorCount(int)} to get details.
-        * 
+        *
         * @return A list of complex error codes
         */
        public int[] getComplexErrorCodes() {
                Map<String, String> allFields = getFields();
                List<Integer> errorCodeList = new ArrayList<Integer>();
-               for (Entry<String, String> field: allFields.entrySet()) {
+               for (Entry<String, String> field : allFields.entrySet()) {
                        String fieldKey = field.getKey();
                        if (fieldKey.startsWith("Errors.")) {
                                int nextDot = fieldKey.indexOf('.', 7);
@@ -177,7 +176,7 @@ public class GetFailed extends BaseMessage {
                }
                int[] errorCodes = new int[errorCodeList.size()];
                int errorIndex = 0;
-               for (int errorCode: errorCodeList) {
+               for (int errorCode : errorCodeList) {
                        errorCodes[errorIndex++] = errorCode;
                }
                return errorCodes;
@@ -186,7 +185,7 @@ public class GetFailed extends BaseMessage {
        /**
         * Returns the description of the complex error. You should only hand it
         * error codes you got from {@link #getComplexErrorCodes()}!
-        * 
+        *
         * @param errorCode
         *            The error code
         * @return The description of the complex error
@@ -198,7 +197,7 @@ public class GetFailed extends BaseMessage {
        /**
         * Returns the count of the complex error. You should only hand it error
         * codes you got from {@link #getComplexErrorCodes()}!
-        * 
+        *
         * @param errorCode
         *            The error code
         * @return The count of the complex error, or <code>-1</code> if the count