ReadLine class

val r = ReadLine()
p(r.feed(byteArrayOf(0x1, 0x2))) // null
p(r.feed(byteArrayOf(0x3, 0x4, 0x5))) // null
p(r.feed(byteArrayOf(0xD))) // null
p(r.feed(byteArrayOf(0xA))) // 1 2 3 4 5 13 10
p(r.feed(byteArrayOf(0xF, 0xD, 0xC))) // null
p(r.feed(byteArrayOf(0xD, 0xA))) // 15 13 12 13 10
p(r.feed(byteArrayOf(0xA))) // null
p(r.feed(byteArrayOf(0x3, 0xD))) // null
p(r.feed(byteArrayOf(0xA))) // 10 3 13 10

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store