onbon.bx06.file
接口 BxFileReaderListener<C>


public interface BxFileReaderListener<C>

文件读取程式监听器。

作者:
ONBON

方法摘要
 void cancel(C owner, String fileName, Bx6GException ex)
          取消文件读取。
 void done(C owner, String fileName, byte[] data)
          完成文件读取。
 void progressChanged(C owner, String fileName, int read, int total)
          读取文件进度更新时。
 void saved(C owner, String fileName, String savePath, Bx6GException failed)
          完成文件储存。
 

方法详细信息

progressChanged

void progressChanged(C owner,
                     String fileName,
                     int read,
                     int total)
读取文件进度更新时。

参数:
owner - 驱动。
fileName - 文件名称。
read - 已读取位元数。
total - 全部位元数。

cancel

void cancel(C owner,
            String fileName,
            Bx6GException ex)
取消文件读取。

参数:
owner - 驱动。
fileName - 文件名称。
ex - 造成作业取消的异常。

done

void done(C owner,
          String fileName,
          byte[] data)
完成文件读取。

参数:
owner - 驱动。
fileName - 文件名称。
data - 文件位元组资料。

saved

void saved(C owner,
           String fileName,
           String savePath,
           Bx6GException failed)
完成文件储存。

参数:
owner - 驱动。
fileName - 文件名称。
savePath - 本地档案名称。
failed - 储存时发生的异常,若正常返为 NULL。


Copyright © 2018 onbon. All rights reserved.