|
@@ -250,10 +250,7 @@ public class RNFetchBlobFS {
|
250
|
250
|
CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
|
251
|
251
|
while ((cursor = fs.read(buffer)) != -1) {
|
252
|
252
|
encoder.encode(ByteBuffer.wrap(buffer).asCharBuffer());
|
253
|
|
- String chunk = new String(buffer);
|
254
|
|
- if(cursor != bufferSize) {
|
255
|
|
- chunk = chunk.substring(0, cursor);
|
256
|
|
- }
|
|
253
|
+ String chunk = new String(buffer, 0, cursor);
|
257
|
254
|
emitStreamEvent(streamId, "data", chunk);
|
258
|
255
|
if(tick > 0)
|
259
|
256
|
SystemClock.sleep(tick);
|