def stringToJavaByteArray(s):
        bytes = jarray.zeros(len(s), 'b')
        for count, c in enumerate(s):
            x = ord(c)
            if x >= 128: x -= 256
            bytes[count] = x
        return bytes
dataset/ETHPy150Open CollabQ/CollabQ/vendor/gdata/tlslite/utils/jython_compat.py/stringToJavaByteArray/original