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

kdu_cache::get_databin_prefix

Java: Kdu_cache::Get_databin_prefix

virtual int get_databin_prefix( int databin_class, kdu_long codestream_id, kdu_long databin_id, kdu_byte buf[], int max_bytes)

Java: int Get_databin_prefix( int databin_class, long codestream_id, long databin_id, byte[] buf, int max_bytes)

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

Go to class description.


Synopsis

This function may be used to read the contents of a data-bin. It represents a useful alternative to the sequence of set_read_scope and read calls. The latter require internal state management, and so can only be used by one thread at a time. The present function, however, involves no state.

See add_to_databin for an explanation of data-bin classes and identifiers.


Return Value

The number of bytes actually written into buf, or -1 if return_negative_if_waiting is true and the data-bin is not yet complete, and the return value would otherwise be less than max_bytes.

Arguments

databin_class [int]

codestream_id [kdu_long]

databin_id [kdu_long]

buf[] [kdu_byte]

max_bytes [int]

Maximum number of bytes to read into buf.


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