Improve remote provisioning buffer handling
This commit is contained in:
parent
0cd3a30291
commit
c68eaa7b22
1 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
package org.linphone;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
|
@ -38,10 +39,12 @@ public class RemoteProvisioning {
|
|||
byte[] contents = new byte[1024];
|
||||
|
||||
int bytesRead = 0;
|
||||
String strFileContents = "";
|
||||
while( (bytesRead = bis.read(contents)) != -1){
|
||||
strFileContents += new String(contents, 0, bytesRead);
|
||||
ByteArrayOutputStream fileContents = new ByteArrayOutputStream();
|
||||
while( (bytesRead = bis.read(contents)) != -1) {
|
||||
fileContents.write(contents, 0, bytesRead);
|
||||
}
|
||||
|
||||
String strFileContents = fileContents.toString();
|
||||
Log.i("Download Success");
|
||||
Log.i(strFileContents);
|
||||
|
||||
|
|
Loading…
Reference in a new issue