Skip to content

Commit bf2328f

Browse files
author
YangSen-qn
committed
modify read log info logic
1 parent bc48394 commit bf2328f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/src/main/java/com/qiniu/android/collect/UploadInfoReporter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ private byte[] getLogData(){
192192
return null;
193193
}
194194

195+
int fileSize = (int)recorderTempFile.length();
195196
RandomAccessFile randomAccessFile = null;
196197
byte[] data = null;
197198
try {
198-
int defaultSize = 3096;
199199
randomAccessFile = new RandomAccessFile(recorderTempFile, "r");
200-
ByteArrayOutputStream out = new ByteArrayOutputStream(defaultSize);
200+
ByteArrayOutputStream out = new ByteArrayOutputStream(fileSize);
201201
int len = 0;
202-
byte[] buff = new byte[defaultSize];
202+
byte[] buff = new byte[fileSize];
203203
while ((len = randomAccessFile.read(buff)) >= 0){
204204
out.write(buff, 0, len);
205205
}

0 commit comments

Comments
 (0)