arrow-endpoint icon indicating copy to clipboard operation
arrow-endpoint copied to clipboard

Mpp Support for ByteBuffer/ InputStream and Charset

Open i-walker opened this issue 4 years ago • 1 comments

  • these are missing as subtypes of arrow.endpoint.EndpointIO.Body previously denoted as
public data class ByteBufferBody<T>(
    override val codec: Codec<ByteBuffer, T, CodecFormat>,
    override val info: Info<T>
  ) : BinaryBody<ByteBuffer, T>

public data class InputStreamBody<T>(
    override val codec: Codec<InputStream, T, CodecFormat>,
    override val info: Info<T>
  ) : BinaryBody<InputStream, T>
  • and as subtypes of arrow.model.Body
public data class ByteBuffer(public val byteBuffer: java.nio.ByteBuffer public override val format: CodecFormat) : Body

public data class InputStream(public val inputStream: java.io.InputStream, public override val format: CodecFormat) : Body
  • Charset in kotlin.text is also teid to Jvm

As alternatives there is kotlinx.io or the ktor.io package

Any suggestions are welcome

i-walker avatar Oct 25 '21 19:10 i-walker

ktor-io is being used, until kotlinx-io is being actively worked on

ByteBuffer and InputStream can be merged to a ByteReadChannel

i-walker avatar Oct 27 '21 15:10 i-walker