The library provides a type for representing a stream of characters for input/output. Such a stream is represented by the type jas_stream_t. Streams (in the JasPer library) are similar to I/O streams in the C standard library but have a few additional functionalities. In particular, with JasPer I/O streams, it is possible to:
The possible underlying sources/sinks for a stream include:
The following functions are used for opening/closing streams:
jas_stream_fopen()jas_stream_memopen2()jas_stream_fdopen()jas_stream_freopen()jas_stream_tmpfile()jas_stream_close()The following functions are used for reading/writing streams:
jas_stream_read()jas_stream_write()jas_stream_peek()jas_stream_printf()jas_stream_puts()jas_stream_gets()jas_stream_ungetc()jas_stream_getc()jas_stream_putc()jas_stream_peekc()jas_stream_gobble()jas_stream_pad()The following functions are used for getting/setting the position within a stream:
Numerous other functions for streams are also provided, including: