artefaktur
software engineer &        architecture

 
 
 
 

IO-Concept of ACDK


By introducing the IO concept, an insertable universal framework, ACDK distants itself even further from its model Java.


Content of this chapter:

   The IO concept in Java
   Character of frameworks
     Streams as Pipes
   Binary Reader and Writer classes in ACDK
     Reader
     Writer
     Storage
     Filter
     FilterReader
     FilterWriter
   Formated Reader/Writer



 The IO concept in Java

In Java, there is not only one IO concept (Input/Output, appreviation IO), but several others as well.


 Character of frameworks

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



 Streams as Pipes

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.



 Binary Reader and Writer classes in ACDK

In ACDK, Stream classes are divided like this:

 Reader

 acdk::io::Readerplaces the base interface for readable accesson a stream. A Reader reads bytes (octets) from the source.

 Writer

 acdk::io::Writer places the basis interface for writable access on a stream. A Writer writes bytes (octets) to a target.

 Storage

A  acdk::io::Storage represents the medium, from which one can read or write. Storage is usually a describer.




 Filter

Filters are again divided into readable and writable:

 FilterReader

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.


 FilterWriter

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.

 Formated Reader/Writer

On top of the Reader/Writer interface formated filter Reader/Writer provides an access to formated Data.

 
Last modified 2005-05-08 22:24 by SYSTEM By Artefaktur, Ing. Bureau Kommer