MCPcopy Index your code
hub / github.com/afkT/DevUtils / WriteCallback

Interface WriteCallback

lib/DevApp/src/main/java/dev/utils/common/StreamUtils.java:322–357  ·  view source on GitHub ↗

detail: 写入回调接口 @author Ttt

Source from the content-addressed store, hash-verified

320 * @author Ttt
321 */
322 public interface WriteCallback {
323
324 /**
325 * 开始写入
326 */
327 void onStart();
328
329 /**
330 * 写入进度回调
331 * @param currentSize 当前已写入长度
332 * @param totalSize 数据总长度
333 * @param percent 写入百分比
334 */
335 void onProgress(
336 long currentSize,
337 long totalSize,
338 int percent
339 );
340
341 /**
342 * 写入异常回调
343 * @param error 异常信息
344 */
345 void onError(Throwable error);
346
347 /**
348 * 写入完成回调
349 */
350 void onFinish();
351
352 /**
353 * 流程结束回调
354 * 不管是 {@link #onError)}、{@link #onFinish)} 最终都会触发该结束方法
355 */
356 void onEnd();
357 }
358}

Callers

nothing calls this directly

Implementers 7

OperationPlanBlib/HttpRequest/DevHttpManager/src/mai
OperationPlanAlib/HttpRequest/DevHttpManager/src/mai
UploadViewModelapplication/DevHttpManagerUse/src/main
UploadAPIapplication/DevHttpManagerUse/src/main
DownloadViewModelapplication/DevHttpManagerUse/src/main
APKDownloadCallbackapplication/DevHttpManagerUse/src/main
DownloadAPIapplication/DevHttpManagerUse/src/main

Calls

no outgoing calls

Tested by

no test coverage detected