Documentation of 'org.python.modules._io.PyRawIOBase' Java class
PyRawIOBase
org.python.modules._io

Class PyRawIOBase

    • Constructor Detail

      • PyRawIOBase

        public PyRawIOBase()
      • PyRawIOBase

        public PyRawIOBase(PyType subtype)
    • Method Detail

      • read

        public PyObject read(int n)
        The read() method is implemented by calling readinto(); derived classes that want to support read() only need to implement readinto() as a primitive operation. In general, readinto() can be more efficient than read().
        Parameters:
        n - number of bytes to read (if possible)
        Returns:
        a PyString holding the bytes read or Py.None (when a non-blocking source is not ready with further data)
      • readall

        public PyObject readall()
        Read until end of file, using multiple read() operations on the underlying stream. If the first read() returns None (only possible in the case of a non-blocking stream), this method returns None.
        Returns:
        a PyString holding the bytes read or Py.None (when a non-blocking source is not ready with further data)
      • readinto

        public PyObject readinto(PyObject b)
        Read up to len(b) bytes into bytearray b and return the number of bytes read. If the object is in non-blocking mode and no bytes are available, None is returned.";
        Parameters:
        b - byte array to try to fill
        Returns:
        number of bytes actually read or Py.None (when a non-blocking source is not ready with further data)
      • write

        public PyObject write(PyObject b)
        Write the given bytes or bytearray object to the underlying raw stream and return the number of bytes written.
        Parameters:
        b - buffer of bytes to be written
        Returns:
        the number of bytes written

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.