'See `man 2 splice`
File-descriptors can be file-like objects with a `fileno` method, or
integers.
Flags can be an integer value, or a list of flags (exposed on this
object).
Returns a tuple of the result of the `splice` call, the output value of
`off_in` and the output value of `off_out` (or `None` for any of these
output values, if applicable).
Upon other errors, an `IOError` is raised with the proper `errno` set.
Note: if you want to pass `NULL` as value for `off_in` or `off_out` to
the system call, you must pass `None`, *not* 0!'

def __call__(self, fd_in, off_in, fd_out, off_out, len_, flags):

    if (not self.available):
        raise EnvironmentError('splice    not    available')
    if (not isinstance(flags, six.integer_types)):
        c_flags = six.moves.reduce(operator.or_, flags, 0)
    else:
        c_flags = flags
    c_fd_in = getattr(fd_in, 'fileno', (lambda : fd_in))()
    c_fd_out = getattr(fd_out, 'fileno', (lambda : fd_out))()
    c_off_in = (ctypes.pointer(c_loff_t(off_in)) if (off_in is not None) else None)
    c_off_out = (ctypes.pointer(c_loff_t(off_out)) if (off_out is not None) else None)
    return self._c_splice(c_fd_in, c_off_in, c_fd_out, c_off_out, len_, c_flags)
