Fixed #20016: worked around Jython not having a buffer.