From 754de6bb0449a577d2bb9c28cca6adf0ef9554f6 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Mon, 6 Feb 2017 10:01:13 +0100 Subject: relates FS#241: Implementation of http download based on okhttp --- .../conversationsplus/http/ProgressListener.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java (limited to 'src/main/java/de/thedevstack/conversationsplus/http/ProgressListener.java') 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); +} -- cgit v1.2.3