Skip navigation links

Package net.lecousin.framework.io

New java Input/Output model adding more flexibility and asynchronous operations.

See: Description

Package net.lecousin.framework.io Description

New java Input/Output model adding more flexibility and asynchronous operations.

The model provided by Java is very basic and mainly based on streams (reading or writing forward).
Our model add two main additions:

Interface defining capabilities

Each implementation defines its capabilities through a set of interfaces defined in IO:

By using those interfaces to define the capabilities of the IO adds much more flexibility:

More details on each interface can be found on their respective Javadoc.

Bridges between Java IO and our model are available: IOFromInputStream, IOFromOutputStream, IOAsInputStream, IOAsOutputStream.

Asynchronous operations

Each interface define both synchronous and asynchronous operations.
Synchronous operations should be avoided when not on a Buffered implementation, but are still available when we want to keep an algorithm simple and synchronous, however those operations may block the thread waiting for the operation to complete.
Asynchronous operations allow to design multi-threaded algorithms and to do not block threads.
Skip navigation links

Copyright © 2019. All rights reserved.