def METHOD_NAME(self, n):
    data = jarray.zeros(n, 'b')
    m = self.istream.read(data)
    if m == -1: # indicates EOF has been reached, so we just return the empty string
        return ""
    elif m <= 0:
        return ""
    if m < n:
        data = data[:m]
    return data.tostring()