We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad600bd commit 91ded51Copy full SHA for 91ded51
firebase-firestore/src/main/java/com/google/firebase/firestore/bundle/BundleReader.java
@@ -200,11 +200,12 @@ private boolean pullMoreData() throws IOException {
200
if (available == 0) {
201
bytesToRead = buffer.remaining();
202
}
203
- byte[] bytes = new byte[bytesToRead];
204
- int bytesRead = bundleInputStream.read(bytes);
+ int bytesRead =
+ bundleInputStream.read(
205
+ buffer.array(), buffer.arrayOffset() + buffer.position(), bytesToRead);
206
boolean readSuccess = bytesRead > 0;
207
if (readSuccess) {
- buffer.put(bytes, 0, bytesRead);
208
+ buffer.position(buffer.position() + bytesRead);
209
210
211
buffer.flip();
0 commit comments