# CSJ2K.j2k.codestream.reader.HeaderDecoder.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_codestream_reader_HeaderDecoder__ctor_" data-uid="CSJ2K.j2k.codestream.reader.HeaderDecoder.#ctor*">HeaderDecoder Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_codestream_reader_HeaderDecoder__ctor_" data-uid="CSJ2K.j2k.codestream.reader.HeaderDecoder.#ctor*"></a>
<h4 id="CSJ2K_j2k_codestream_reader_HeaderDecoder__ctor_CSJ2K_j2k_io_RandomAccessIO_CSJ2K_j2k_util_ParameterList_CSJ2K_j2k_codestream_HeaderInfo_" data-uid="CSJ2K.j2k.codestream.reader.HeaderDecoder.#ctor(CSJ2K.j2k.io.RandomAccessIO,CSJ2K.j2k.util.ParameterList,CSJ2K.j2k.codestream.HeaderInfo)">HeaderDecoder(RandomAccessIO, ParameterList, HeaderInfo)</h4>
<div class="markdown level1 summary"><p>Creates a HeaderDecoder instance and read in two passes the main header
of the codestream. The first and last marker segments shall be
respectively SOC and SOT.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public HeaderDecoder(RandomAccessIO ehs, ParameterList pl, HeaderInfo hi)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(ehs As RandomAccessIO, pl As ParameterList, hi As HeaderInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.html">RandomAccessIO</a></td>
      <td><span class="parametername">ehs</span></td>
      <td><p>The encoded header stream where marker segments are
extracted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.util.ParameterList.html">ParameterList</a></td>
      <td><span class="parametername">pl</span></td>
      <td><p>The ParameterList object of the decoder</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.codestream.HeaderInfo.html">HeaderInfo</a></td>
      <td><span class="parametername">hi</span></td>
      <td><p>The HeaderInfo holding information found in marker segments</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.codestream.CorruptedCodestreamException.html">CorruptedCodestreamException</a></td>
      <td><p>If invalid data is found in the
codestream main header.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
