Skip to content

Converting from PipedInputStream to seq of byte arrays goes through Strings! #4

Closed
@dgrnbrg

Description

@dgrnbrg

If I do (conversion-path java.io.PipedInputStream (seq-of byte-array)), then I get ([#'byte-streams/ByteSource java.lang.CharSequence] [java.lang.CharSequence java.lang.String] [java.lang.String [B] [[B java.nio.DirectByteBuffer] [java.nio.ByteBuffer (seq-of java.nio.ByteBuffer)] [(seq-of java.nio.ByteBuffer) (seq-of [B)]).

I'd expect to see ([java.io.InputStream java.nio.channels.ReadableByteChannel] [java.nio.channels.ReadableByteChannel (seq-of java.nio.ByteBuffer)] [(seq-of java.nio.ByteBuffer) (seq-of [B)]), which I can get by first converting to (seq-of java.nio.ByteBuffer), and then converting to (seq-of byte-array).

This is especially bad because there's this exception with the current behavior: IllegalArgumentException Malformed byte-stream input to CharsetDecoder. byte-streams.char-sequence/parse-result (char_sequence.clj:15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions