is = connection.getInputStream();
byte[] buffer = new byte[1024 * 1024 * 2];
int length = -1;
while ((length = is.read(buffer)) != -1) {
Log.d("read.length:"+length);
}
在android5.0+以上机型测试上面代码,length最大为2048,求问如何使得最大读取空间为buffer的长度?
is = connection.getInputStream();
byte[] buffer = new byte[1024 * 1024 * 2];
int length = -1;
while ((length = is.read(buffer)) != -1) {
Log.d("read.length:"+length);
}
在android5.0+以上机型测试上面代码,length最大为2048,求问如何使得最大读取空间为buffer的长度?