|
|
|
|
|
|
By introducing the IO concept, an insertable universal framework,
ACDK distants itself even further from its model Java.
In Java, there is not only one IO concept (Input/Output, appreviation IO),
but several others as well.
Frameworks with a good design are distinguished through:
- Their basic principles can be explained with only a few good interfaces
- are relative easy to be implemented
- are relative easy to be expanded
- can be universally inputted
When using input/output, there are several types of elements.
Those, which read and write from a medium (like a file, console, TCP etc.)and those, which work as a filter with an existing stream.
A well known example are the Unix command-line utilities, where pipes can be used for Standard-IN and Standard-OUT:
cat address.dat | cut -d ';' -f 2 | grep 'Kassel' | wc -l > erg.dat
Unix-Tools can also be seen as the nucleus of classical component technologies.
These elements can now be put together, just like in a building set.
In ACDK, Stream classes are divided like this:
acdk::io::Readerplaces the base interface for
readable accesson a stream. A Reader reads bytes (octets)
from the source.
acdk::io::Writer places the basis interface for writable access on a stream.
A Writer writes bytes (octets) to a target.
A acdk::io::Storage represents the medium, from which one can read or write. Storage is usually a describer.
Filters are again divided into readable and writable:
A acdk::io::FilterReader reads from a given reader.
This can further be a acdk::io::FilterReader or a acdk::io::Storage
which implementates a acdk::io::Reader interface.
A acdk::io::FilterWriter reads from a given reader.
This can further be a acdk::io::FilterWriter or a acdk::io::Storage which implementates a
acdk::io::Writer interface.
On top of the Reader/Writer interface formated filter Reader/Writer
provides an access to formated Data.
|
|