projects
/
jFCPlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat source code, new line length for comments (79), some trailing whitespace...
[jFCPlib.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
fcp
/
AllData.java
diff --git
a/src/main/java/net/pterodactylus/fcp/AllData.java
b/src/main/java/net/pterodactylus/fcp/AllData.java
index
ef427b1
..
b4daa27
100644
(file)
--- a/
src/main/java/net/pterodactylus/fcp/AllData.java
+++ b/
src/main/java/net/pterodactylus/fcp/AllData.java
@@
-22,9
+22,9
@@
import java.io.InputStream;
/**
* The “AllData” message carries the payload of a successful {@link ClientGet}
/**
* The “AllData” message carries the payload of a successful {@link ClientGet}
- * request. You will only received this message if the {@link ClientGet}
request
- *
was started with a return type of {@link ReturnType#direct}. If you get this
- * message and decide that the data is for you, call
+ * request. You will only received this message if the {@link ClientGet}
+ *
request was started with a return type of {@link ReturnType#direct}. If you
+ *
get this
message and decide that the data is for you, call
* {@link #getPayloadInputStream()} to get the data. If an AllData message
* passes through all registered {@link FcpListener}s without the payload being
* consumed, the payload is discarded!
* {@link #getPayloadInputStream()} to get the data. If an AllData message
* passes through all registered {@link FcpListener}s without the payload being
* consumed, the payload is discarded!
@@
-54,6
+54,7
@@
public class AllData extends BaseMessage implements Identifiable {
*
* @return The identifier of the request
*/
*
* @return The identifier of the request
*/
+ @Override
public String getIdentifier() {
return getField("Identifier");
}
public String getIdentifier() {
return getField("Identifier");
}
@@
-99,4
+100,13
@@
public class AllData extends BaseMessage implements Identifiable {
return payloadInputStream;
}
return payloadInputStream;
}
+ /**
+ * Returns the content type of the found file.
+ *
+ * @return The content type
+ */
+ public String getContentType() {
+ return getField("Metadata.ContentType");
+ }
+
}
}