arrow-endpoint
arrow-endpoint copied to clipboard
Mpp Support for ByteBuffer/ InputStream and Charset
- these are missing as subtypes of
arrow.endpoint.EndpointIO.Bodypreviously 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
ktor-io is being used, until kotlinx-io is being actively worked on
ByteBuffer and InputStream can be merged to a ByteReadChannel