jp2_input_box * open_stream( )
Java: Jp2_input_box Open_stream( )
[Declared in "../apps/compressed_io/jpx.h"]
Opens the contiguous codestream or fragment table box which holds the codestream itself, returning a pointer to the open box. The pointer refers to an internal jp2_input_box object which must be closed before this function may be called again. If an attempt is made to call this function without first closing the box returned by a previous call, an error will be generated through kdu_error. Otherwise, the function always succeeds and never returns a NULL pointer.
It is possible to maintain multiple open boxes to the same codestream, but to do this you must open the auxiliary boxes using the locator returned via get_stream_loc.
If the JPX data source is ultimately served by a dynamic cache (i.e., a jp2_family_src object whose jp2_family_src::open function was passed a kdu_cache data source), you can be sure only of the fact that the main code-stream header data-bin will be completely available, so that you can always successfully pass the jp2_input_box returned here to kdu_codestream::create. This is because no jpx_codestream_source interface will be opened until the corresponding embedded code-stream has been found and its main header, at least, is fully available.