Assignments are not expressions - Kotlin

前端 未结 2 489
醉酒成梦
醉酒成梦 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条回答
  •  北海茫月
    2020-12-21 10:36

    This is a work around to your problem:

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

    For further detail read this discussion.

提交回复
热议问题