|
|
|
|
63
|
public long read(Buffer sink, long byteCount) throws IOException {
|
63
|
public long read(Buffer sink, long byteCount) throws IOException {
|
64
|
|
64
|
|
65
|
long read = mOriginalSource.read(sink, byteCount);
|
65
|
long read = mOriginalSource.read(sink, byteCount);
|
66
|
- bytesRead += read;
|
|
|
|
|
66
|
+ bytesRead += read > 0 ? read : 0;
|
67
|
WritableMap args = Arguments.createMap();
|
67
|
WritableMap args = Arguments.createMap();
|
68
|
args.putString("taskId", mTaskId);
|
68
|
args.putString("taskId", mTaskId);
|
69
|
args.putString("written", String.valueOf(bytesRead));
|
69
|
args.putString("written", String.valueOf(bytesRead));
|