aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-02-06 10:01:13 +0100
committersteckbrief <steckbrief@chefmail.de>2017-02-06 10:01:13 +0100
commit754de6bb0449a577d2bb9c28cca6adf0ef9554f6 (patch)
tree279b405d94e0d86d10ed94bd34d919457944ead6 /src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
parentcd633f13b8d7327e47994bb5a000f0c0b7089e7f (diff)
relates FS#241: Implementation of http download based on okhttp
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java b/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
new file mode 100644
index 00000000..b834eae1
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java
@@ -0,0 +1,14 @@
+package de.thedevstack.conversationsplus.http;
+
+/**
+ *
+ */
+public interface ProgressListener {
+ /**
+ * React on transferred bytes.
+ * @param bytesRead the number of bytes transferred in the current chunk
+ * @param contentLength the total number of bytes to be transferred
+ * @param done whether there are bytes left or not
+ */
+ void update(long bytesRead, long contentLength, boolean done);
+}