Skip to content

ArrayList converts bytes to str #612

Open
@wensheng

Description

from jnius import autoclass

ArrayList = autoclass("java.util.ArrayList")

md = ArrayList()
md.add(b'hello')
md.add(b'world')

print(type(md.get(0)))  # should be bytes, but is str
print(md.get(0))  # should be b'hello', but is 'hello'

Added bytes to ArrayList, but got str back.

Is it possible to get it fixed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions