# CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent" class="text-break">FileBitstreamReaderAgent Class
</h1>
  <div class="markdown level0 summary"><p>This class reads the bit stream (with the help of HeaderDecoder for tile
headers and PktDecoder for packets header and body) and retrives location
of all code-block's codewords.</p>
<pre><code>       &lt;p&gt;Note: All tile-parts headers are read by the constructor whereas packets
       are processed when decoding related tile (when setTile method is
       called).&lt;/p&gt;&lt;p&gt;In parsing mode, the reader simulates a virtual layer-resolution
       progressive bit stream with the same truncation points in each code-block,
       whereas in truncation mode, only the first bytes are taken into account (it
       behaves like if it is a real truncated codestream).&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="CSJ2K.j2k.codestream.reader.BitstreamReaderAgent.html">BitstreamReaderAgent</a></div>
    <div class="level2"><span class="xref">FileBitstreamReaderAgent</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="CSJ2K.j2k.entropy.decoder.CodedCBlkDataSrcDec.html">CodedCBlkDataSrcDec</a></div>
    <div><a class="xref" href="CSJ2K.j2k.wavelet.synthesis.InvWTData.html">InvWTData</a></div>
    <div><a class="xref" href="CSJ2K.j2k.wavelet.synthesis.MultiResImgData.html">MultiResImgData</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.codestream.reader.html">CSJ2K.j2k.codestream.reader</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class FileBitstreamReaderAgent : BitstreamReaderAgent, CodedCBlkDataSrcDec, InvWTData, MultiResImgData</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class FileBitstreamReaderAgent
    Inherits BitstreamReaderAgent
    Implements CodedCBlkDataSrcDec, InvWTData, MultiResImgData</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent__ctor_CSJ2K_j2k_codestream_reader_HeaderDecoder_CSJ2K_j2k_io_RandomAccessIO_CSJ2K_j2k_decoder_DecoderSpecs_CSJ2K_j2k_util_ParameterList_System_Boolean_CSJ2K_j2k_codestream_HeaderInfo_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.#ctor(CSJ2K.j2k.codestream.reader.HeaderDecoder,CSJ2K.j2k.io.RandomAccessIO,CSJ2K.j2k.decoder.DecoderSpecs,CSJ2K.j2k.util.ParameterList,System.Boolean,CSJ2K.j2k.codestream.HeaderInfo)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.-ctor.html#CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent__ctor_CSJ2K_j2k_codestream_reader_HeaderDecoder_CSJ2K_j2k_io_RandomAccessIO_CSJ2K_j2k_decoder_DecoderSpecs_CSJ2K_j2k_util_ParameterList_System_Boolean_CSJ2K_j2k_codestream_HeaderInfo_">FileBitstreamReaderAgent(HeaderDecoder, RandomAccessIO, DecoderSpecs, ParameterList, bool, HeaderInfo)</a>
        </td>
        <td class="markdown level1 summary"><p>Reads all tiles headers and keep offset of their first
packet. Finally it calls the rate allocation method.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_pktDec" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.pktDec">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.pktDec.html">pktDec</a>
        </td>
        <td class="markdown level1 summary"><p>Reference to the PktDecoder instance</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_CBlkInfo" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.CBlkInfo">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.CBlkInfo.html#CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_CBlkInfo">CBlkInfo</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the reference to the CBlkInfo array</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_System_Int32_System_Int32_CSJ2K_j2k_entropy_decoder_DecLyrdCBlk_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getCodeBlock(System.Int32,System.Int32,System.Int32,CSJ2K.j2k.wavelet.synthesis.SubbandSyn,System.Int32,System.Int32,CSJ2K.j2k.entropy.decoder.DecLyrdCBlk)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getCodeBlock.html#CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_System_Int32_System_Int32_CSJ2K_j2k_entropy_decoder_DecLyrdCBlk_">getCodeBlock(int, int, int, SubbandSyn, int, int, DecLyrdCBlk)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the specified coded code-block, for the specified component, in
the current tile. The first layer to return is indicated by 'fl'. The
number of layers that is returned depends on 'nl' and the amount of
available data.</p>
<pre><code>       &lt;p&gt;The argument 'fl' is to be used by subsequent calls to this method
       for the same code-block. In this way supplemental data can be retrieved
       at a later time. The fact that data from more than one layer can be
       returned means that several packets from the same code-block, of the
       same component, and the same tile, have been concatenated.&lt;/p&gt;&lt;p&gt;The returned compressed code-block can have its progressive
       attribute set. If this attribute is set it means that more data can be
       obtained by subsequent calls to this method (subject to transmission
       delays, etc). If the progressive attribute is not set it means that the
       returned data is all the data that can be obtained for the specified
       code-block.&lt;/p&gt;&lt;p&gt;The compressed code-block is uniquely specified by the current tile,
       the component (identified by 'c'), the subband (indentified by 'sb')
       and the code-block vertical and horizontal indexes 'n' and 'm'.&lt;/p&gt;&lt;p&gt;The 'ulx' and 'uly' members of the returned 'DecLyrdCBlk' object
       contain the coordinates of the top-left corner of the block, with
       respect to the tile, not the subband.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getNumTileParts_System_Int32_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getNumTileParts(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getNumTileParts.html#CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getNumTileParts_System_Int32_">getNumTileParts(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of tile-part found for a given tile</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_nextTile" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.nextTile">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.nextTile.html#CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_nextTile">nextTile()</a>
        </td>
        <td class="markdown level1 summary"><p>Advances to the next tile, in standard scan-line order (by rows then
columns). A NoNextElementException is thrown if the current tile is the
last one (i.e. there is no next tile).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_setTile_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.setTile(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.setTile.html#CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_setTile_System_Int32_System_Int32_">setTile(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the current tile, given the new indexes. An
IllegalArgumentException is thrown if the indexes do not correspond to
a valid tile.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="CSJ2K.j2k.codestream.reader.HeaderDecoder.html">HeaderDecoder</a></div>
      <div><a class="xref" href="CSJ2K.j2k.codestream.reader.PktDecoder.html">PktDecoder</a></div>
  </div>

</div>
