byte[] buf = new byte[1024];
int readBytes=0;
try {
FileOutputStream output = openFileOutput(filename, Context.MODE_PRIVATE);
// /data/data/com.example.software.a20190411/files/ 파일경로
while ((readBytes = socket.getInputStream().read(buf)) != -1) {
output.write(buf,0,readBytes);
Log.d(String.valueOf(MainActivity.this),"-----------"+readBytes+"-----------");
}
output.close();
Log.d(String.valueOf(MainActivity.this),"############"+readBytes+"############");
} catch (FileNotFoundException e){} catch (IOException e){}
}
디버그기록보면 -------readBytes-------- 까지는 출력되는데
그이후로 while문에서 나오질 못합니다 방법아시는분?