# CSJ2K.j2k.entropy.decoder.MQDecoder.nextSegment

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_entropy_decoder_MQDecoder_nextSegment_" data-uid="CSJ2K.j2k.entropy.decoder.MQDecoder.nextSegment*">nextSegment Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_entropy_decoder_MQDecoder_nextSegment_" data-uid="CSJ2K.j2k.entropy.decoder.MQDecoder.nextSegment*"></a>
<h4 id="CSJ2K_j2k_entropy_decoder_MQDecoder_nextSegment_System_Byte___System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.decoder.MQDecoder.nextSegment(System.Byte[],System.Int32,System.Int32)">nextSegment(byte[], int, int)</h4>
<div class="markdown level1 summary"><p>Resets the MQ decoder to start a new segment. This is like recreating a
new MQDecoder object with new input data.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void nextSegment(byte[] buf, int off, int len)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub nextSegment(buf As Byte(), off As Integer, len As Integer)</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="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><span class="parametername">buf</span></td>
      <td><p>The byte array containing the MQ encoded data. If null the
current byte array is assumed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">off</span></td>
      <td><p>The index of the first element in 'buf' to be decoded. If
negative the byte just after the previous segment is assumed, only
valid if 'buf' is null.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">len</span></td>
      <td><p>The number of bytes in 'buf' to be decoded. Any subsequent
bytes are taken to be 0xFF.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
