I\'m refactoring my project built with Java to Kotlin and to copy database from sqlite assets table I\'m doing this and it works correctly.
private void copy
Change it to:
mLength = mInput.read(mBuffer) while (mLength > 0) { mOutput.write(mBuffer, 0, mLength) mLength = mInput.read(mBuffer) }