| synopsis || return value || arguments || prev || next |

kdu_cache::read

Java: Kdu_cache::Read

virtual int read( kdu_byte * buf, int num_bytes)

Java: int Read( byte[] buf, int num_bytes)

Overrides kdu_compressed_source::read

[Declared in "../apps/compressed_io/kdu_cache.h"]

Go to class description.


Synopsis

This function implements the functionality required of kdu_compressed_source::read. It reads data sequentially from the data-bin indicated in the most recent call to set_read_scope — note that set_read_scope may have been invoked indirectly from set_tileheader_scope or set_precinct_sope. If set_read_scope has not yet been called, since the object was created or since the last call to close, this function returns 0 immediately.


Return Value

The number of bytes actually read and written into the supplied buf buffer. This value will never exceed num_bytes, but may be less than num_bytes if the end of the data-bin is encountered. After the end of the data-bin has been reached, subsequent calls to read will invariably return 0.

Arguments

buf [kdu_byte *]

num_bytes [int]


| top || synopsis || return value || arguments || prev || next |