detail: 写入回调接口 @author Ttt
| 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected