kotlinx-io icon indicating copy to clipboard operation
kotlinx-io copied to clipboard

Question: Implement custom multi-platform InputStream

Open wollnyst opened this issue 7 years ago • 0 comments
trafficstars

Hello,

I have asked the question on StackOverflow, but didn't get any response there. So I'll try my luck here.

I’m looking for a multi-platform alternative to input streams. My concrete task is to fetch an encrypted file from a remote server via https and decrypt it on demand.

In Java land I would an implement InputStream which proxies the reads to the input stream from the https library. How can I do the same in kotlin targeting multiple platforms.

I see ktor returns an ByteReadChannel, but I don’t know which functions.

I’m lost and don’t know where to start. Thanks for your help in advance.

wollnyst avatar Oct 30 '18 05:10 wollnyst