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 bc48394 commit bf2328fCopy full SHA for bf2328f
library/src/main/java/com/qiniu/android/collect/UploadInfoReporter.java
@@ -192,14 +192,14 @@ private byte[] getLogData(){
192
return null;
193
}
194
195
+ int fileSize = (int)recorderTempFile.length();
196
RandomAccessFile randomAccessFile = null;
197
byte[] data = null;
198
try {
- int defaultSize = 3096;
199
randomAccessFile = new RandomAccessFile(recorderTempFile, "r");
200
- ByteArrayOutputStream out = new ByteArrayOutputStream(defaultSize);
+ ByteArrayOutputStream out = new ByteArrayOutputStream(fileSize);
201
int len = 0;
202
- byte[] buff = new byte[defaultSize];
+ byte[] buff = new byte[fileSize];
203
while ((len = randomAccessFile.read(buff)) >= 0){
204
out.write(buff, 0, len);
205
0 commit comments