[[i_o_api]]
 

Input/Output API

Abstract

Streams

Input and ouput operations should be done on distinct interfaces. As many stream are only used in a read-only or write-only mode. Anyway, some streams are used for both mode, so an interface combining both modes is required.

The fundamental streams should handle only bytes, since lower-level I/O operations are only about bytes. Anyway, there should be higher level interfaces to handle characters and strings. And maybe some other kind of objects.

Some streams provide random access, such as file streams, some specific interfaces should be avaible for those streams.

File system

API proposition

Fundamental classes

  • ByteInStream : Byte input stream
  • ByteOutStream : Byte output stream
  • ByteIOStream (extends ByteInStream, ByteOutStream) : Byte input + output stream
  • ByteInRandStream (extends ByteInStream) : Byte input random access stream
  • ByteOutRandStream (extends ByteOutStream) : Byte output random access stream
  • ByteIORandStream (extends ByteInRandStream, ByteOutRandStream) : Byte input + output random access stream
  • CharInStream : Character / String input stream
  • CharOutStream : Character / String input stream
 
i_o_api.txt · Last modified: 2010/07/19 23:10 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki