Assignments are not expressions - Kotlin

前端 未结 2 492
醉酒成梦
醉酒成梦 2020-12-21 10:09

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         


        
2条回答
  •  猫巷女王i
    2020-12-21 10:23

    Change it to:

     mLength = mInput.read(mBuffer)
     while (mLength > 0) { 
            mOutput.write(mBuffer, 0, mLength)
            mLength = mInput.read(mBuffer)
        }
    

提交回复
热议问题