org.python.modules._io

## Class _io

- java.lang.Object
- - org.python.modules._io._io

All Implemented Interfaces:
  ClassDictInit

    public class _io
    extends Object
    implements ClassDictInit

The Python _io module implemented in Java.

### Field Summary

Fields
`static String` `__doc__`
`static String` `__doc__open`
`static PyInteger` `DEFAULT_BUFFER_SIZE` Default buffer size for export.
`static PyType` `UnsupportedOperation` A Python class for the `UnsupportedOperation` exception.

### Constructor Summary

Constructors
Constructor and Description
`_io()`

### Method Summary

Methods
`static void` `classDictInit(PyObject dict)` This method is called when the module is loaded, to populate the namespace (dictionary) of the module.
`static PyObject` `open(PyObject[] args, String[] kwds)` Open file and return a stream.
`static PyException` `UnsupportedOperation(String message)` A function that returns a `PyException`, which is a Java exception suitable for throwing, and that will be raised as an `UnsupportedOperation` Python exception.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### UnsupportedOperation

    public static PyType UnsupportedOperation

A Python class for the `UnsupportedOperation` exception.

#### DEFAULT_BUFFER_SIZE

    public static final PyInteger DEFAULT_BUFFER_SIZE

Default buffer size for export.

#### __doc__

    public static final String __doc__

See Also:
  Constant Field Values

#### __doc__open

    public static final String __doc__open

See Also:
  Constant Field Values

### Constructor Detail

#### _io

    public _io()

### Method Detail

#### classDictInit

    public static void classDictInit(PyObject dict)

This method is called when the module is loaded, to populate the namespace (dictionary) of the module. The dictionary has been initialised at this point reflectively from the methods of this class and this method nulls those entries that ought not to be exposed.

Parameters:
  `dict` - namespace of the module

#### UnsupportedOperation

    public static PyException UnsupportedOperation(String message)

A function that returns a `PyException`, which is a Java exception suitable for throwing, and that will be raised as an `UnsupportedOperation` Python exception.

Parameters:
  `message` - text message parameter to the Python exception
Returns:
  nascent `UnsupportedOperation` Python exception

#### open

    public static PyObject open(PyObject[] args,
                String[] kwds)

Open file and return a stream. Raise IOError upon failure. This is a port to Java of the CPython _io.open (Modules/_io/_iomodule.c) following the same logic, but expressed with the benefits of Java syntax.

Parameters:
  `args` - array of arguments from Python call via Jython framework
  `kwds` - array of keywords from Python call via Jython framework
Returns:
  the stream object