Tell me how to write several ByteBuffer correctly in one txt file. I write one buffer to a separate file like this:
File file; File path = Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_DOWNLOADS); file = new File(path, "first.txt"); boolean append = true; try { FileChannel wChannel = new FileOutputStream(file, append).getChannel(); wChannel.write(byteBuffer); wChannel.close(); } catch (IOException e) { e.printStackTrace(); } How to write several byteBuffer in one txt file in sequence?