Return the content type of the found data.
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / AllData.java
index d1541bf..b997ab4 100644 (file)
@@ -31,7 +31,7 @@ import java.io.InputStream;
  *
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  */
-public class AllData extends BaseMessage {
+public class AllData extends BaseMessage implements Identifiable {
 
        /** The payload. */
        private InputStream payloadInputStream;
@@ -99,4 +99,13 @@ public class AllData extends BaseMessage {
                return payloadInputStream;
        }
 
+       /**
+        * Returns the content type of the found file.
+        *
+        * @return The content type
+        */
+       public String getContentType() {
+               return getField("Metadata.ContentType");
+       }
+
 }