X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2FFcpMessage.java;h=b238db3f7b297ab93a29ab18cab962fe5a469782;hb=a655177a4605236e866ac7e0ce32f7cb5289cbc4;hp=ff65a98c4f7288b4281a41da640ed9ae97f8b90f;hpb=dc3b3c4209759abd658e9e27cb52d13e6f65f4b3;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/FcpMessage.java b/src/net/pterodactylus/fcp/FcpMessage.java index ff65a98..b238db3 100644 --- a/src/net/pterodactylus/fcp/FcpMessage.java +++ b/src/net/pterodactylus/fcp/FcpMessage.java @@ -1,6 +1,5 @@ /* - * jSite2 - FcpMessage.java - - * Copyright © 2008 David Roden + * jFCPlib - FcpMessage.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 @@ -34,7 +33,6 @@ import java.util.Map.Entry; * data that follows the marker. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FcpMessage implements Iterable { @@ -89,8 +87,8 @@ public class FcpMessage implements Iterable { * * @param field * The name of the field to check for - * @return true if the message has a field with the given - * name, false otherwise + * @return true if the message has a field with the given name, + * false otherwise */ public boolean hasField(String field) { return fields.containsKey(field); @@ -117,8 +115,8 @@ public class FcpMessage implements Iterable { * * @param field * The name of the field - * @return The value of the field, or null if there is no - * such field + * @return The value of the field, or null if there is no such + * field */ public String getField(String field) { return fields.get(field); @@ -152,10 +150,10 @@ public class FcpMessage implements Iterable { /** * Writes this message to the given output stream. If the message has a - * payload (i.e. {@link #payloadInputStream} is not null) - * the payload is written to the given output stream after the message as - * well. That means that this method can only be called once because on the - * second invocation the payload input stream could not be read (again). + * payload (i.e. {@link #payloadInputStream} is not null) the + * payload is written to the given output stream after the message as well. + * That means that this method can only be called once because on the second + * invocation the payload input stream could not be read (again). * * @param outputStream * The output stream to write the message to @@ -164,7 +162,7 @@ public class FcpMessage implements Iterable { */ public void write(OutputStream outputStream) throws IOException { writeLine(outputStream, name); - for (Entry fieldEntry: fields.entrySet()) { + for (Entry fieldEntry : fields.entrySet()) { writeLine(outputStream, fieldEntry.getKey() + "=" + fieldEntry.getValue()); } writeLine(outputStream, "EndMessage");