The first implementation of a set of new I/O APIs.

The intention of this change includes basic support of data reference,
segment and supplying of a custom I/O interface.