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 53695ce commit 5a89406Copy full SHA for 5a89406
library/src/main/java/com/qiniu/android/collect/UploadInfoCollector.java
@@ -287,13 +287,14 @@ private byte[] getLogData(File recordFile){
287
return null;
288
}
289
290
+ int fileSize = (int)recordFile.length();
291
RandomAccessFile randomAccessFile = null;
292
byte[] data = null;
293
try {
294
randomAccessFile = new RandomAccessFile(recordFile, "r");
- ByteArrayOutputStream out = new ByteArrayOutputStream();
295
+ ByteArrayOutputStream out = new ByteArrayOutputStream(fileSize);
296
int len = 0;
- byte[] buff = new byte[3096];
297
+ byte[] buff = new byte[fileSize];
298
while ((len = randomAccessFile.read(buff)) >= 0){
299
out.write(buff, 0, len);
300
0 commit comments