simplify creation of payload input stream
[jSite2.git] / src / net / pterodactylus / util / fcp / BaseMessage.java
index d64cef2..e5f043a 100644 (file)
@@ -3,6 +3,8 @@
  */
 package net.pterodactylus.util.fcp;
 
+import java.util.Map;
+
 /**
  * A basic message abstraction that wraps a received FCP message.
  * 
@@ -41,8 +43,18 @@ public class BaseMessage {
         * @return The content of the field, or <code>null</code> if there is no
         *         such field
         */
-       public String getField(String field) {
+       protected String getField(String field) {
                return receivedMessage.getField(field);
        }
 
+       /**
+        * Returns all fields from the received message.
+        * 
+        * @see FcpMessage#getFields()
+        * @return All fields from the message
+        */
+       protected Map<String, String> getFields() {
+               return receivedMessage.getFields();
+       }
+
 }